Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b2bb54c4
authored
Mar 02, 2016
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common: humanize missing permissions error message
parent
2be155b5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
circle/common/operations.py
+3
-2
No files found.
circle/common/operations.py
View file @
b2bb54c4
...
@@ -175,8 +175,9 @@ class Operation(object):
...
@@ -175,8 +175,9 @@ class Operation(object):
raise
ImproperlyConfigured
(
raise
ImproperlyConfigured
(
"Set required_perms to () if none needed."
)
"Set required_perms to () if none needed."
)
if
not
user
.
has_perms
(
cls
.
required_perms
):
if
not
user
.
has_perms
(
cls
.
required_perms
):
raise
PermissionDenied
(
raise
humanize_exception
(
ugettext_noop
(
u"
%
s doesn't have the required permissions."
%
user
)
"You don't have the required permissions."
),
PermissionDenied
())
if
cls
.
superuser_required
and
not
user
.
is_superuser
:
if
cls
.
superuser_required
and
not
user
.
is_superuser
:
raise
humanize_exception
(
ugettext_noop
(
raise
humanize_exception
(
ugettext_noop
(
"Superuser privileges are required."
),
PermissionDenied
())
"Superuser privileges are required."
),
PermissionDenied
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment