obj perm
This commit is contained in:
parent
2be68645fd
commit
dd7f9663da
|
@ -64,7 +64,8 @@ class RbacPermission(BasePermission):
|
|||
"""
|
||||
if not request.user:
|
||||
return False
|
||||
has_obj_perm(request.user, obj)
|
||||
if hasattr(obj, 'belong_dept'):
|
||||
has_obj_perm(request.user, obj)
|
||||
return True
|
||||
|
||||
def has_obj_perm(user, obj):
|
||||
|
|
Loading…
Reference in New Issue