Forbidden registration configuration
This commit is contained in:
parent
480a275246
commit
6696fcf8af
@ -1,11 +1,11 @@
|
|||||||
title = "Authsquare"
|
title = "Authsquare"
|
||||||
header = f"Welcome to {title}"
|
header = f"Welcome to {title}"
|
||||||
copyright = "Copyright (C) 2024 Dita Aji Pratama"
|
copyright = "Copyright (C) 2024 Dita Aji Pratama"
|
||||||
|
|
||||||
production = False
|
production = False
|
||||||
su_mode = True
|
forbidden_registration = ['su', 'admin']
|
||||||
|
|
||||||
auth_key = 'your_key'
|
auth_key = 'your_key'
|
||||||
|
|
||||||
ssh = {
|
ssh = {
|
||||||
"key":{
|
"key":{
|
||||||
|
@ -53,9 +53,9 @@ class auth:
|
|||||||
response["data" ] = {
|
response["data" ] = {
|
||||||
"recaptcha":captcha_r
|
"recaptcha":captcha_r
|
||||||
}
|
}
|
||||||
elif globalvar.su_mode == False and roles == 'su':
|
elif roles in globalvar.forbidden_registration:
|
||||||
response["status" ] = "failed"
|
response["status" ] = "failed"
|
||||||
response["desc" ] = "Forbidden to become super user"
|
response["desc" ] = f"Forbidden to become {roles}"
|
||||||
response["data" ] = {
|
response["data" ] = {
|
||||||
"recaptcha":captcha_r
|
"recaptcha":captcha_r
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user