implement user expiry functionality

All works now, but i'll add a field on the accounts tab for users with
an expiry, as well as a 'disabled' badge.
This commit is contained in:
Harvey Tindall
2021-02-28 15:41:06 +00:00
parent 2934832a98
commit 1e9d184508
21 changed files with 500 additions and 132 deletions
+6 -1
View File
@@ -338,6 +338,8 @@ func start(asDaemon, firstCall bool) {
app.storage.loadConfiguration()
app.storage.displayprefs_path = app.config.Section("files").Key("user_displayprefs").String()
app.storage.loadDisplayprefs()
app.storage.users_path = app.config.Section("files").Key("users").String()
app.storage.loadUsers()
app.storage.profiles_path = app.config.Section("files").Key("user_profiles").String()
app.storage.loadProfiles()
@@ -510,9 +512,12 @@ func start(asDaemon, firstCall bool) {
os.Exit(0)
}
inviteDaemon := newRepeater(time.Duration(60*time.Second), app)
inviteDaemon := newInviteDaemon(time.Duration(60*time.Second), app)
go inviteDaemon.run()
userDaemon := newUserDaemon(time.Duration(60*time.Second), app)
go userDaemon.run()
if app.config.Section("password_resets").Key("enabled").MustBool(false) && serverType == mediabrowser.JellyfinServer {
go app.StartPWR()
}