refactor: некоторые изменения кода

This commit is contained in:
2026-04-11 19:57:26 +03:00
parent a1bc8dd9fa
commit 1d2a55706f
6 changed files with 56 additions and 45 deletions

19
utils/init_login_db.r Normal file
View File

@@ -0,0 +1,19 @@
# script to setup authentification database (using shinymanager)
# SETUP AUTH =============================
# Init DB using credentials data
credentials <- data.frame(
user = c("admin", "user"),
password = c("admin", "user"),
# password will automatically be hashed
admin = c(TRUE, FALSE),
stringsAsFactors = FALSE
)
# Init the database
shinymanager::create_db(
credentials_data = credentials,
sqlite_path = "auth.sqlite", # will be created
passphrase = Sys.getenv("AUTH_DB_KEY")
# passphrase = "passphrase_wihtout_keyring"
)