Forbidden registration configuration
This commit is contained in:
parent
480a275246
commit
6696fcf8af
@ -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":{
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user