We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9ed5fd commit f46de12Copy full SHA for f46de12
app/api/permissions.py
@@ -66,17 +66,21 @@ class IsProjectAdmin(RolePermission):
66
class IsAnnotatorAndReadOnly(RolePermission):
67
role_name = settings.ROLE_ANNOTATOR
68
69
+
70
class IsAnnotator(RolePermission):
71
unsafe_methods_check = False
72
73
74
75
class IsAnnotationApproverAndReadOnly(RolePermission):
76
role_name = settings.ROLE_ANNOTATION_APPROVER
77
78
79
class IsAnnotationApprover(RolePermission):
80
81
82
83
84
def is_in_role(role_name, user_id, project_id):
85
return RoleMapping.objects.filter(
86
user_id=user_id,
0 commit comments