Forbidden registration configuration

This commit is contained in:
Dita Aji Pratama 2024-07-25 17:35:08 +07:00
parent 480a275246
commit 6696fcf8af
2 changed files with 8 additions and 8 deletions

View File

@ -3,7 +3,7 @@ header = f"Welcome to {title}"
copyright = "Copyright (C) 2024 Dita Aji Pratama"
production = False
su_mode = True
forbidden_registration = ['su', 'admin']
auth_key = 'your_key'

View File

@ -53,9 +53,9 @@ class auth:
response["data" ] = {
"recaptcha":captcha_r
}
elif globalvar.su_mode == False and roles == 'su':
elif roles in globalvar.forbidden_registration:
response["status" ] = "failed"
response["desc" ] = "Forbidden to become super user"
response["desc" ] = f"Forbidden to become {roles}"
response["data" ] = {
"recaptcha":captcha_r
}