authsquare/app/config/globalvar.py

91 lines
2.1 KiB
Python
Raw Normal View History

2024-07-25 17:35:08 +07:00
title = "Authsquare"
header = f"Welcome to {title}"
copyright = "Copyright (C) 2024 Dita Aji Pratama"
2024-07-25 17:35:08 +07:00
production = False
forbidden_registration = ['su', 'admin']
2024-06-17 17:40:15 +07:00
2024-07-25 17:35:08 +07:00
auth_key = 'your_key'
2024-06-17 17:48:14 +07:00
ssh = {
"key":{
"private" : "/root/.ssh/id_rsa",
"public" : "/root/.ssh/id_rsa.pub"
},
"passphrase" : None # use b'value' if use passphrase
}
reCAPTCHA = {
"client" : "your_key",
"server" : "your_key"
}
smtpconfig = {
"login" : {
"email" : "user@domain.com",
"password" : "your_password"
},
"server" : {
"host" : "smtp.domain.com",
"port" : 587
},
"from" : "user@domain.com"
}
baseurl = "https://domain.com"
if production == False:
baseurl = "http://localhost:15001"
def resend_url(email):
url = f"{baseurl}/api/auth/registration/resend?email={email}"
return url
def notme_url(token):
url = f"{baseurl}/notme?token={token}"
return url
def verification_url(token):
url = f"{baseurl}/verify?token={token}"
return url
def change_forgot_url(token):
url = f"{baseurl}/portal/change/forgot?token={token}"
return url
menu = {
"public": {
"navbar": [
{
"name":"Home",
"target":"_self",
"href":"/",
2024-06-17 12:51:09 +07:00
"roles":[0,1,2,3]
},
{
2024-06-17 12:51:09 +07:00
"name":"Dashboard",
"target":"_self",
2024-06-17 12:51:09 +07:00
"href":"/portal/dashboard",
"roles":[1,2]
},
{
2024-06-17 12:51:09 +07:00
"name":"Register",
"target":"_self",
2024-06-17 17:39:36 +07:00
"href":"/register/member",
2024-06-17 12:51:09 +07:00
"roles":[0]
},
{
"name":"Login",
"target":"_self",
2024-06-18 23:58:08 +07:00
"href":"/login",
2024-06-17 12:51:09 +07:00
"roles":[0]
},
{
"name":"Logout",
"target":"_self",
2024-06-18 23:58:08 +07:00
"href":"/logout",
2024-06-17 12:51:09 +07:00
"roles":[1,2,3]
}
]
}
}