parent
3c500643b1
commit
a6f72155da
@ -0,0 +1,11 @@ |
||||
from rest_framework import permissions |
||||
|
||||
class IsClubOwner(permissions.BasePermission): |
||||
|
||||
def has_object_permission(self, request, view, club): |
||||
# Check if the request user is the owner of the club |
||||
|
||||
print(club.creator.id) |
||||
print(request.user.id) |
||||
|
||||
return club.creator == request.user |
||||
Loading…
Reference in new issue