mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-21 10:15:09 +01:00
1ee59f0fa3
We have some instances that only allow using an external authentication source for authentication. In this case, users changing their email, password, or linked OpenID connections will not have any effect, and we'd like to prevent showing that to them to prevent confusion. Included in this are several changes to support this: * A new setting to disable user managed authentication credentials (email, password & OpenID connections) * A new setting to disable user managed MFA (2FA codes & WebAuthn) * Fix an issue where some templates had separate logic for determining if a feature was disabled since it didn't check the globally disabled features * Hide more user setting pages in the navbar when their settings aren't enabled --------- Co-authored-by: Kyle D <kdumontnu@gmail.com>
18 lines
666 B
Handlebars
18 lines
666 B
Handlebars
{{template "user/settings/layout_head" (dict "ctxData" . "pageClass" "user settings security")}}
|
|
{{if not ($.UserDisabledFeatures.Contains "manage_mfa" "manage_credentials")}}
|
|
<div class="user-setting-content">
|
|
{{if not ($.UserDisabledFeatures.Contains "manage_mfa")}}
|
|
{{template "user/settings/security/twofa" .}}
|
|
{{template "user/settings/security/webauthn" .}}
|
|
{{end}}
|
|
{{if not ($.UserDisabledFeatures.Contains "manage_credentials")}}
|
|
{{template "user/settings/security/accountlinks" .}}
|
|
{{if .EnableOpenIDSignIn}}
|
|
{{template "user/settings/security/openid" .}}
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
|
|
{{template "user/settings/layout_footer" .}}
|