Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
ccc292d9
Commit
ccc292d9
authored
Aug 07, 2018
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 去掉debug信息
parent
337338eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
4 deletions
+0
-4
permissions.py
apps/common/permissions.py
+0
-3
mixins.py
apps/orgs/mixins.py
+0
-1
No files found.
apps/common/permissions.py
View file @
ccc292d9
...
...
@@ -79,7 +79,6 @@ class AdminUserRequiredMixin(UserPassesTestMixin):
return
True
def
dispatch
(
self
,
request
,
*
args
,
**
kwargs
):
print
(
"Current org: {}"
.
format
(
current_org
))
if
not
request
.
user
.
is_authenticated
:
return
super
()
.
dispatch
(
request
,
*
args
,
**
kwargs
)
...
...
@@ -92,6 +91,4 @@ class AdminUserRequiredMixin(UserPassesTestMixin):
print
(
"Is org admin"
)
return
redirect
(
'orgs:switch-a-org'
)
return
HttpResponseForbidden
()
else
:
print
(
current_org
.
can_admin_by
(
request
.
user
))
return
super
()
.
dispatch
(
request
,
*
args
,
**
kwargs
)
apps/orgs/mixins.py
View file @
ccc292d9
...
...
@@ -43,7 +43,6 @@ class OrgManager(models.Manager):
def
all
(
self
):
if
not
current_org
:
msg
=
'You can `objects.set_current_org(org).all()` then run it'
warnings
.
warn
(
msg
)
return
self
else
:
return
super
(
OrgManager
,
self
)
.
all
()
...
...
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