diff --git a/archivist/apps/api/permissions.py b/archivist/apps/api/permissions.py index 0ebdc6b..34961f9 100644 --- a/archivist/apps/api/permissions.py +++ b/archivist/apps/api/permissions.py @@ -13,3 +13,10 @@ class AdminOnly(permissions.BasePermission): def has_permission(self, request, view): return check_admin(request.user) + +class AdminOnlyOrReadOnly(permissions.BasePermission): + def has_permission(self, request, view): + if request.method in permissions.SAFE_METHODS: + return True + return check_admin(request.user) +