mirror of https://github.com/jumpserver/jumpserver
[Update] 去掉debug信息
parent
337338ebf3
commit
ccc292d9a9
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue