You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description="Any prefix which satsifies the naming standard.",
23
+
example="test"
24
+
),
25
+
"description": openapi.Schema(
26
+
type=openapi.TYPE_STRING,
27
+
description="A description of what this prefix should represent. For example, the prefix 'GLY' would be related to BCOs which were derived from GlyGen workflows.",
28
+
example="Test prefix description."
29
+
),
30
+
"authorized_groups": openapi.Schema(
31
+
type=openapi.TYPE_ARRAY,
32
+
description="Groups which can access the BCOs using this prefix. If it is none then anyone can access.",
# TODO: Need to get the schema that is being sent here from FE
30
-
request_body=openapi.Schema(
31
-
type=openapi.TYPE_ARRAY,
32
-
title="Prefix Creation Schema",
33
-
items=openapi.Schema(
34
-
type=openapi.TYPE_OBJECT,
35
-
required=["prefix"],
36
-
properties={
37
-
"prefix": openapi.Schema(
38
-
type=openapi.TYPE_STRING,
39
-
description="Any prefix which satsifies the naming standard (see link...)",
40
-
example="test"
41
-
),
42
-
"description": openapi.Schema(
43
-
type=openapi.TYPE_STRING,
44
-
description="A description of what this prefix should represent. For example, the prefix 'GLY' would be related to BCOs which were derived from GlyGen workflows.",
45
-
example="Test prefix description."
46
-
),
47
-
"authorized_groups": openapi.Schema(
48
-
type=openapi.TYPE_ARRAY,
49
-
description="Groups which can access the BCOs using this prefix. If it is none then anyone can access.",
The requestor *must* be in the group prefix_admins to delete a prefix.
127
+
128
+
__Any object created under this prefix will have its permissions "locked out." This means that any other view which relies on object-level permissions, such as /api/objects/drafts/read/, will not allow any requestor access to particular objects.__
129
+
130
+
131
+
"""
132
+
133
+
permission_classes= [IsAuthenticated]
134
+
135
+
request_body=openapi.Schema(
136
+
type=openapi.TYPE_ARRAY,
137
+
title="Prefix Deletion Schema",
138
+
description="Provide a list of prefixes to delete.",
139
+
items=openapi.Schema(
140
+
type=openapi.TYPE_STRING,
141
+
example="TEST"
142
+
)
143
+
)
144
+
145
+
@swagger_auto_schema(
146
+
request_body=request_body,
147
+
responses={
148
+
200: "Deleting a prefix was successful.",
149
+
401: "Unauthorized. Authentication credentials were not provided.",
150
+
403: "Forbidden. User doesnot have permission to perform this action",
151
+
404: "The prefix couldn't be found so therefore it could not be deleted.",
0 commit comments