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

@ -1,11 +1,11 @@
title = "Authsquare"
header = f"Welcome to {title}"
copyright = "Copyright (C) 2024 Dita Aji Pratama"
title = "Authsquare"
header = f"Welcome to {title}"
copyright = "Copyright (C) 2024 Dita Aji Pratama"
production = False
su_mode = True
production = False
forbidden_registration = ['su', 'admin']
auth_key = 'your_key'
auth_key = 'your_key'
ssh = {
"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
}