mirror of
https://github.com/mediacms-io/mediacms.git
synced 2024-11-25 01:34:51 +01:00
fix error in permissions
This commit is contained in:
parent
40eaffef94
commit
7513870778
@ -24,7 +24,7 @@ class IsUserOrManager(permissions.BasePermission):
|
||||
if is_mediacms_manager(request.user):
|
||||
return True
|
||||
|
||||
return obj == request.user
|
||||
return obj.user == request.user
|
||||
|
||||
|
||||
class IsUserOrEditor(permissions.BasePermission):
|
||||
@ -41,7 +41,7 @@ class IsUserOrEditor(permissions.BasePermission):
|
||||
if is_mediacms_editor(request.user):
|
||||
return True
|
||||
|
||||
return obj == request.user
|
||||
return obj.user == request.user
|
||||
|
||||
|
||||
def user_allowed_to_upload(request):
|
||||
|
Loading…
Reference in New Issue
Block a user