diff --git a/ipynbsrv/api/permissions.py b/ipynbsrv/api/permissions.py index e9f78c5..ae0b1ac 100644 --- a/ipynbsrv/api/permissions.py +++ b/ipynbsrv/api/permissions.py @@ -17,7 +17,7 @@ def validate_object_permission(permission_class, request, obj): Decorator function that calls has_object_permission and raises a PermissionDenied exception if permission is denied. """ - if not has_object_permission(CollaborationGroupDetailPermission, request, group): + if not has_object_permission(permission_class, request, obj): raise PermissionDenied