summaryrefslogtreecommitdiff
path: root/internal/handlers/handler_configuration.go
diff options
context:
space:
mode:
authorJames Elliott <james-d-elliott@users.noreply.github.com>2020-04-05 09:28:09 +1000
committerGitHub <noreply@github.com>2020-04-05 09:28:09 +1000
commit9800421b88a07cc8287acee39ddf9c26ec38f9af (patch)
tree0fe48fa1e558e03b9611917d9f30d4144ba4929d /internal/handlers/handler_configuration.go
parenta6308d72c37308caac64563816e876ef9177f9a0 (diff)
[FEATURE] Disable Reset Password (#823)
* [FEATURE] Disable Reset Password * add configuration key to authentication_backend called disable_reset_password * disable_reset_password prevents the API handler for the functionality and the UI element * disable_reset_password is a boolean * adjust RememberMeEnabled to be RememberMe instead as it's just unnecessary * add docs for security measures and in the authentication docs * updated config.template.yml * add flexEnd style to align reset password when remember me disabled * add todo items for ldap user/password validation relating to this
Diffstat (limited to 'internal/handlers/handler_configuration.go')
-rw-r--r--internal/handlers/handler_configuration.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/handlers/handler_configuration.go b/internal/handlers/handler_configuration.go
index 3a2b02cd3..d4eb9aff0 100644
--- a/internal/handlers/handler_configuration.go
+++ b/internal/handlers/handler_configuration.go
@@ -4,13 +4,15 @@ import "github.com/authelia/authelia/internal/middlewares"
type ConfigurationBody struct {
GoogleAnalyticsTrackingID string `json:"ga_tracking_id,omitempty"`
- RememberMeEnabled bool `json:"remember_me_enabled"` // whether remember me is enabled or not
+ RememberMe bool `json:"remember_me"` // whether remember me is enabled or not
+ ResetPassword bool `json:"reset_password"`
}
func ConfigurationGet(ctx *middlewares.AutheliaCtx) {
body := ConfigurationBody{
GoogleAnalyticsTrackingID: ctx.Configuration.GoogleAnalyticsTrackingID,
- RememberMeEnabled: ctx.Providers.SessionProvider.RememberMe != 0,
+ RememberMe: ctx.Providers.SessionProvider.RememberMe != 0,
+ ResetPassword: !ctx.Configuration.AuthenticationBackend.DisableResetPassword,
}
ctx.SetJSONBody(body)
}