[Bugfix] IsSuperUserOrAppUser deny app user (#2558)

pull/2599/head
jokimina 2019-04-15 14:33:40 +08:00 committed by 老广
parent 699b8d9980
commit 78e4e13fb9
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ class IsSuperUser(IsValidUser):
class IsSuperUserOrAppUser(IsSuperUser):
def has_permission(self, request, view):
return super(IsSuperUserOrAppUser, self).has_permission(request, view) \
and (request.user.is_superuser or request.user.is_app)
or request.user.is_app
class IsOrgAdmin(IsValidUser):