diff options
author | 2022-02-05 18:32:06 +0400 | |
---|---|---|
committer | 2022-02-05 18:32:06 +0400 | |
commit | 7ae2d8714a5fd11155ee3974c1b7cd1be20ac56d (patch) | |
tree | becc6030138022e334dceb6f3c0dada3fdcbf8d1 /backend/routes/forms/index.py | |
parent | Add Role Based Authorized Readers (diff) |
Add Role Based Editors To Forms
Adds the ability to specify who can edit forms using discord roles.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'backend/routes/forms/index.py')
-rw-r--r-- | backend/routes/forms/index.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/routes/forms/index.py b/backend/routes/forms/index.py index 22171fa..38be693 100644 --- a/backend/routes/forms/index.py +++ b/backend/routes/forms/index.py @@ -15,13 +15,13 @@ from backend.validation import ErrorMessage, OkayResponse, api class FormsList(Route): """ - List all available forms for administrator viewing. + List all available forms for authorized viewers. """ name = "forms_list_create" path = "/" - @requires(["authenticated", "admin"]) + @requires(["authenticated", "Admins"]) @api.validate(resp=Response(HTTP_200=FormList), tags=["forms"]) async def get(self, request: Request) -> JSONResponse: """Return a list of all forms to authenticated users.""" @@ -38,7 +38,7 @@ class FormsList(Route): forms ) - @requires(["authenticated", "admin"]) + @requires(["authenticated", "Helpers"]) @api.validate( json=Form, resp=Response(HTTP_200=OkayResponse, HTTP_400=ErrorMessage), |