diff --git a/api.go b/api.go index 9fdb3ae..775b0be 100644 --- a/api.go +++ b/api.go @@ -271,8 +271,9 @@ func (app *appContext) NewUser(gc *gin.Context) { respond(401, "Unknown error", gc) return } - app.checkInvite(req.Code, true, req.Username) + app.storage.loadProfiles() invite := app.storage.invites[req.Code] + app.checkInvite(req.Code, true, req.Username) if app.config.Section("notifications").Key("enabled").MustBool(false) { for address, settings := range invite.Notify { if settings["notify-creation"] { @@ -296,6 +297,7 @@ func (app *appContext) NewUser(gc *gin.Context) { id = user["Id"].(string) } if invite.Profile != "" { + app.debug.Printf("Applying settings from profile \"%s\"", invite.Profile) profile, ok := app.storage.profiles[invite.Profile] if !ok { profile = app.storage.profiles["Default"] diff --git a/config/config-base.json b/config/config-base.json index 6d2baa1..10240ca 100644 --- a/config/config-base.json +++ b/config/config-base.json @@ -177,7 +177,7 @@ "bs5": { "name": "Use Bootstrap 5", "required": false, - "requires_restart": false, + "requires_restart": true, "type": "bool", "value": false, "description": "Use Bootstrap 5 (currently in alpha). This also removes the need for jQuery, so the page should load faster." diff --git a/data/config-base.json b/data/config-base.json index 93620a0..0e102a2 100644 --- a/data/config-base.json +++ b/data/config-base.json @@ -216,7 +216,7 @@ "bs5": { "name": "Use Bootstrap 5", "required": false, - "requires_restart": false, + "requires_restart": true, "type": "bool", "value": false, "description": "Use Bootstrap 5 (currently in alpha). This also removes the need for jQuery, so the page should load faster." @@ -715,7 +715,7 @@ "requires_restart": true, "type": "text", "value": "", - "description": "Location of stored user policy template (json)." + "description": "Deprecated. Location of stored user policy template (json)." }, "user_configuration": { "name": "userConfiguration", @@ -723,7 +723,7 @@ "requires_restart": true, "type": "text", "value": "", - "description": "Location of stored user configuration template (used for setting homescreen layout) (json)" + "description": "Deprecated. Location of stored user configuration template (used for setting homescreen layout) (json)" }, "user_displayprefs": { "name": "displayPreferences", @@ -731,7 +731,7 @@ "requires_restart": true, "type": "text", "value": "", - "description": "Location of stored displayPreferences template (also used for homescreen layout) (json)" + "description": "Deprecated. Location of stored displayPreferences template (also used for homescreen layout) (json)" }, "user_profiles": { "name": "User Profiles", @@ -739,7 +739,7 @@ "requires_restart": true, "type": "text", "value": "", - "description": "Location of stored user profiles (encompasses template and homescreen) (json)" + "description": "Location of stored user profiles (encompasses template and configuration and displayprefs) (json)" }, "custom_css": { "name": "Custom CSS", diff --git a/data/templates/admin.html b/data/templates/admin.html index 531e08b..e65536f 100644 --- a/data/templates/admin.html +++ b/data/templates/admin.html @@ -437,7 +437,7 @@

Profiles are applied to users when they create an account. They include things like access rights and homescreen layout. You can create them here.

- +
diff --git a/ts/settings.ts b/ts/settings.ts index 3908994..3e8266e 100644 --- a/ts/settings.ts +++ b/ts/settings.ts @@ -156,7 +156,7 @@ const populateProfiles = (noTable?: boolean): void => _get("/getProfiles", null, }; profileList.innerHTML += ` - +
Name${name} ${profile.FromUser} ${profile.Admin ? "Yes" : "No"} ${profile.LibraryAccess}