generate .super_user file on startup if adminui is enabled (#1651)
* generate .super_user file on startup if adminui is enabled * only save super_user id instead of url
This commit is contained in:
parent
5c119e903d
commit
667de4d1f0
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -23,6 +23,7 @@ tests/data/*.sqlite3
|
||||||
*.pyc
|
*.pyc
|
||||||
*.env
|
*.env
|
||||||
.env
|
.env
|
||||||
|
.super_user
|
||||||
|
|
||||||
data
|
data
|
||||||
*.sqlite3
|
*.sqlite3
|
||||||
|
|
|
@ -447,6 +447,10 @@ async def check_admin_settings():
|
||||||
admin_url = f"{settings.lnbits_baseurl}wallet?usr={settings.super_user}"
|
admin_url = f"{settings.lnbits_baseurl}wallet?usr={settings.super_user}"
|
||||||
logger.success(f"✔️ Access super user account at: {admin_url}")
|
logger.success(f"✔️ Access super user account at: {admin_url}")
|
||||||
|
|
||||||
|
# saving it to .super_user file
|
||||||
|
with open(".super_user", "w") as file:
|
||||||
|
file.write(settings.super_user)
|
||||||
|
|
||||||
# callback for saas
|
# callback for saas
|
||||||
if (
|
if (
|
||||||
settings.lnbits_saas_callback
|
settings.lnbits_saas_callback
|
||||||
|
|
Loading…
Reference in New Issue
Block a user