diff options
author | 2021-02-20 03:45:16 +0300 | |
---|---|---|
committer | 2021-02-20 03:45:16 +0300 | |
commit | 3c4f7e71cb1ecdfd8d255b02cf44adcd90f32f01 (patch) | |
tree | c62f8fa061f2d99f4463b874011634139447b740 /backend/routes/forms/submit.py | |
parent | Adds Expiry To Authorization Routes (diff) |
Centralizes Admin Authentication
Sets admin authentication on authenticator to allow the addition and
removal of admins without creating a new token.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'backend/routes/forms/submit.py')
-rw-r--r-- | backend/routes/forms/submit.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/backend/routes/forms/submit.py b/backend/routes/forms/submit.py index 55a4875..8627a29 100644 --- a/backend/routes/forms/submit.py +++ b/backend/routes/forms/submit.py @@ -127,6 +127,7 @@ class SubmitForm(Route): if constants.FormFeatures.REQUIRES_LOGIN.value in form.features: if request.user.is_authenticated: response["user"] = request.user.payload + response["user"]["admin"] = request.user.admin if constants.FormFeatures.COLLECT_EMAIL.value in form.features and "email" not in response["user"]: # noqa return JSONResponse({ |