From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/user/auth/activate.tmpl | 61 +++++++++++++++++++++++ templates/user/auth/captcha.tmpl | 30 ++++++++++++ templates/user/auth/change_passwd.tmpl | 7 +++ templates/user/auth/change_passwd_inner.tmpl | 22 +++++++++ templates/user/auth/finalize_openid.tmpl | 47 ++++++++++++++++++ templates/user/auth/forgot_passwd.tmpl | 39 +++++++++++++++ templates/user/auth/grant.tmpl | 34 +++++++++++++ templates/user/auth/grant_error.tmpl | 16 ++++++ templates/user/auth/link_account.tmpl | 34 +++++++++++++ templates/user/auth/oauth_container.tmpl | 29 +++++++++++ templates/user/auth/oidc_wellknown.tmpl | 49 +++++++++++++++++++ templates/user/auth/prohibit_login.tmpl | 16 ++++++ templates/user/auth/reset_passwd.tmpl | 65 +++++++++++++++++++++++++ templates/user/auth/signin.tmpl | 9 ++++ templates/user/auth/signin_inner.tmpl | 65 +++++++++++++++++++++++++ templates/user/auth/signin_openid.tmpl | 51 +++++++++++++++++++ templates/user/auth/signup.tmpl | 9 ++++ templates/user/auth/signup_inner.tmpl | 64 ++++++++++++++++++++++++ templates/user/auth/signup_openid_connect.tmpl | 36 ++++++++++++++ templates/user/auth/signup_openid_navbar.tmpl | 12 +++++ templates/user/auth/signup_openid_register.tmpl | 37 ++++++++++++++ templates/user/auth/twofa.tmpl | 26 ++++++++++ templates/user/auth/twofa_scratch.tmpl | 25 ++++++++++ templates/user/auth/webauthn.tmpl | 25 ++++++++++ templates/user/auth/webauthn_error.tmpl | 13 +++++ 25 files changed, 821 insertions(+) create mode 100644 templates/user/auth/activate.tmpl create mode 100644 templates/user/auth/captcha.tmpl create mode 100644 templates/user/auth/change_passwd.tmpl create mode 100644 templates/user/auth/change_passwd_inner.tmpl create mode 100644 templates/user/auth/finalize_openid.tmpl create mode 100644 templates/user/auth/forgot_passwd.tmpl create mode 100644 templates/user/auth/grant.tmpl create mode 100644 templates/user/auth/grant_error.tmpl create mode 100644 templates/user/auth/link_account.tmpl create mode 100644 templates/user/auth/oauth_container.tmpl create mode 100644 templates/user/auth/oidc_wellknown.tmpl create mode 100644 templates/user/auth/prohibit_login.tmpl create mode 100644 templates/user/auth/reset_passwd.tmpl create mode 100644 templates/user/auth/signin.tmpl create mode 100644 templates/user/auth/signin_inner.tmpl create mode 100644 templates/user/auth/signin_openid.tmpl create mode 100644 templates/user/auth/signup.tmpl create mode 100644 templates/user/auth/signup_inner.tmpl create mode 100644 templates/user/auth/signup_openid_connect.tmpl create mode 100644 templates/user/auth/signup_openid_navbar.tmpl create mode 100644 templates/user/auth/signup_openid_register.tmpl create mode 100644 templates/user/auth/twofa.tmpl create mode 100644 templates/user/auth/twofa_scratch.tmpl create mode 100644 templates/user/auth/webauthn.tmpl create mode 100644 templates/user/auth/webauthn_error.tmpl (limited to 'templates/user/auth') diff --git a/templates/user/auth/activate.tmpl b/templates/user/auth/activate.tmpl new file mode 100644 index 0000000..9ae811b --- /dev/null +++ b/templates/user/auth/activate.tmpl @@ -0,0 +1,61 @@ +{{template "base/head" .}} +
+
+
+
+ {{.CsrfTokenHtml}} +

+ {{ctx.Locale.Tr "auth.active_your_account"}} +

+
+ {{template "base/alert" .}} + {{if .IsActivatePage}} + {{if .ServiceNotEnabled}} +

{{ctx.Locale.Tr "auth.disable_register_mail"}}

+ {{else if .ResendLimited}} +

{{ctx.Locale.Tr "auth.resent_limit_prompt"}}

+ {{else}} +

{{ctx.Locale.Tr "auth.confirmation_mail_sent_prompt" .SignedUser.Email .ActiveCodeLives}}

+ {{end}} + {{else}} + {{if .NeedsPassword}} +
+ + +
+
+ +
+ + {{else if .IsSendRegisterMail}} +

{{ctx.Locale.Tr "auth.confirmation_mail_sent_prompt" .Email .ActiveCodeLives}}

+ {{else if .IsCodeInvalid}} +

{{ctx.Locale.Tr "auth.invalid_code"}}

+ {{else if .IsPasswordInvalid}} +

{{ctx.Locale.Tr "auth.invalid_password"}}

+ {{else if .ManualActivationOnly}} +

{{ctx.Locale.Tr "auth.manual_activation_only"}}

+ {{else}} +

{{ctx.Locale.Tr "auth.has_unconfirmed_mail" .SignedUser.Name .SignedUser.Email}}

+
+
+ {{ctx.Locale.Tr "auth.change_unconfirmed_email_summary"}} + +

{{ctx.Locale.Tr "auth.change_unconfirmed_email"}}

+
+ + +
+
+ +
+ +
+ {{end}} + {{end}} +
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/captcha.tmpl b/templates/user/auth/captcha.tmpl new file mode 100644 index 0000000..03e3607 --- /dev/null +++ b/templates/user/auth/captcha.tmpl @@ -0,0 +1,30 @@ +{{if .EnableCaptcha}}{{if eq .CaptchaType "image"}} +
+ + +
+
+ + +
+{{else if eq .CaptchaType "recaptcha"}} +
+
+
+ +{{else if eq .CaptchaType "hcaptcha"}} +
+
+
+ +{{else if eq .CaptchaType "mcaptcha"}} +
+
+
+
+{{else if eq .CaptchaType "cfturnstile"}} +
+
+
+ +{{end}}{{end}} diff --git a/templates/user/auth/change_passwd.tmpl b/templates/user/auth/change_passwd.tmpl new file mode 100644 index 0000000..e05f46f --- /dev/null +++ b/templates/user/auth/change_passwd.tmpl @@ -0,0 +1,7 @@ +{{template "base/head" .}} +
+
+ {{template "user/auth/change_passwd_inner" .}} +
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/change_passwd_inner.tmpl b/templates/user/auth/change_passwd_inner.tmpl new file mode 100644 index 0000000..601f036 --- /dev/null +++ b/templates/user/auth/change_passwd_inner.tmpl @@ -0,0 +1,22 @@ + {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}} + {{template "base/alert" .}} + {{end}} +

+ {{ctx.Locale.Tr "settings.update_password"}} +

+
+
+ {{.CsrfTokenHtml}} +
+ + +
+
+ + +
+
+ +
+
+
diff --git a/templates/user/auth/finalize_openid.tmpl b/templates/user/auth/finalize_openid.tmpl new file mode 100644 index 0000000..f84f860 --- /dev/null +++ b/templates/user/auth/finalize_openid.tmpl @@ -0,0 +1,47 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/forgot_passwd.tmpl b/templates/user/auth/forgot_passwd.tmpl new file mode 100644 index 0000000..55bcf63 --- /dev/null +++ b/templates/user/auth/forgot_passwd.tmpl @@ -0,0 +1,39 @@ +{{template "base/head" .}} +
+
+
+
+ {{.CsrfTokenHtml}} +

+ {{ctx.Locale.Tr "auth.forgot_password_title"}} +

+
+ {{template "base/alert" .}} + {{if .IsResetSent}} +

{{ctx.Locale.Tr "auth.reset_password_mail_sent_prompt" .Email .ResetPwdCodeLives}}

+ {{else if .IsResetRequest}} +
+ + +
+
+
+ +
+ {{else if .IsResetDisable}} +

+ {{if $.IsAdmin}} + {{ctx.Locale.Tr "auth.disable_forgot_password_mail_admin"}} + {{else}} + {{ctx.Locale.Tr "auth.disable_forgot_password_mail"}} + {{end}} +

+ {{else if .ResendLimited}} +

{{ctx.Locale.Tr "auth.resent_limit_prompt"}}

+ {{end}} +
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/grant.tmpl b/templates/user/auth/grant.tmpl new file mode 100644 index 0000000..1a1b72b --- /dev/null +++ b/templates/user/auth/grant.tmpl @@ -0,0 +1,34 @@ +{{template "base/head" .}} +
+
+
+

+ {{ctx.Locale.Tr "auth.authorize_title" .Application.Name}} +

+
+ {{template "base/alert" .}} +

+ {{ctx.Locale.Tr "auth.authorize_application_description"}}
+ {{ctx.Locale.Tr "auth.authorize_application_created_by" .ApplicationCreatorLinkHTML}} +

+

With scopes: {{.Scope}}.

+
+
+

{{ctx.Locale.Tr "auth.authorize_redirect_notice" .ApplicationRedirectDomainHTML}}

+
+
+
+ {{.CsrfTokenHtml}} + + + + + + + +
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/grant_error.tmpl b/templates/user/auth/grant_error.tmpl new file mode 100644 index 0000000..b2e0779 --- /dev/null +++ b/templates/user/auth/grant_error.tmpl @@ -0,0 +1,16 @@ +{{template "base/head" .}} +
+ {{if .IsRepo}}{{template "repo/header" .}}{{end}} +
+
+

+ {{ctx.Locale.Tr "auth.authorization_failed"}} +

+

{{.Error.ErrorDescription}}

+
+

{{ctx.Locale.Tr "auth.authorization_failed_desc"}}

+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/link_account.tmpl b/templates/user/auth/link_account.tmpl new file mode 100644 index 0000000..e8bb3d4 --- /dev/null +++ b/templates/user/auth/link_account.tmpl @@ -0,0 +1,34 @@ +{{template "base/head" .}} + + +{{template "base/footer" .}} diff --git a/templates/user/auth/oauth_container.tmpl b/templates/user/auth/oauth_container.tmpl new file mode 100644 index 0000000..bb6a10d --- /dev/null +++ b/templates/user/auth/oauth_container.tmpl @@ -0,0 +1,29 @@ +{{if or .OAuth2Providers .EnableOpenIDSignIn}} +
+ {{ctx.Locale.Tr "sign_in_or"}} +
+ +{{end}} diff --git a/templates/user/auth/oidc_wellknown.tmpl b/templates/user/auth/oidc_wellknown.tmpl new file mode 100644 index 0000000..54bb4a7 --- /dev/null +++ b/templates/user/auth/oidc_wellknown.tmpl @@ -0,0 +1,49 @@ +{ + "issuer": "{{AppUrl | JSEscape}}", + "authorization_endpoint": "{{AppUrl | JSEscape}}login/oauth/authorize", + "token_endpoint": "{{AppUrl | JSEscape}}login/oauth/access_token", + "jwks_uri": "{{AppUrl | JSEscape}}login/oauth/keys", + "userinfo_endpoint": "{{AppUrl | JSEscape}}login/oauth/userinfo", + "introspection_endpoint": "{{AppUrl | JSEscape}}login/oauth/introspect", + "response_types_supported": [ + "code", + "id_token" + ], + "id_token_signing_alg_values_supported": [ + "{{.SigningKey.SigningMethod.Alg | JSEscape}}" + ], + "subject_types_supported": [ + "public" + ], + "scopes_supported": [ + "openid", + "profile", + "email", + "groups" + ], + "claims_supported": [ + "aud", + "exp", + "iat", + "iss", + "sub", + "name", + "preferred_username", + "profile", + "picture", + "website", + "locale", + "updated_at", + "email", + "email_verified", + "groups" + ], + "code_challenge_methods_supported": [ + "plain", + "S256" + ], + "grant_types_supported": [ + "authorization_code", + "refresh_token" + ] +} diff --git a/templates/user/auth/prohibit_login.tmpl b/templates/user/auth/prohibit_login.tmpl new file mode 100644 index 0000000..962ddfa --- /dev/null +++ b/templates/user/auth/prohibit_login.tmpl @@ -0,0 +1,16 @@ +{{template "base/head" .}} +
+
+
+
+

+ {{ctx.Locale.Tr "auth.prohibit_login"}} +

+
+

{{ctx.Locale.Tr "auth.prohibit_login_desc"}}

+
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/reset_passwd.tmpl b/templates/user/auth/reset_passwd.tmpl new file mode 100644 index 0000000..f8303fe --- /dev/null +++ b/templates/user/auth/reset_passwd.tmpl @@ -0,0 +1,65 @@ +{{template "base/head" .}} +
+
+
+
+ {{.CsrfTokenHtml}} + +

+ {{ctx.Locale.Tr "auth.reset_password"}} +

+
+ {{template "base/alert" .}} + {{if .user_email}} +
+ + +
+ {{end}} + {{if .IsResetForm}} +
+ + +
+ {{if not .user_signed_in}} +
+
+ + +
+
+ {{end}} + {{if .has_two_factor}} +

+ {{ctx.Locale.Tr "twofa"}} +

+
{{ctx.Locale.Tr "settings.twofa_is_enrolled"}}
+ {{if .scratch_code}} +
+ + +
+ + {{else}} +
+ + +
+ {{end}} + {{end}} +
+
+ + {{if and .has_two_factor (not .scratch_code)}} + {{ctx.Locale.Tr "auth.use_scratch_code"}} + {{end}} +
+ {{else}} +

{{ctx.Locale.Tr "auth.invalid_code_forgot_password" (printf "%s/user/forgot_password" AppSubUrl)}}

+ {{end}} +
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/signin.tmpl b/templates/user/auth/signin.tmpl new file mode 100644 index 0000000..54cc82d --- /dev/null +++ b/templates/user/auth/signin.tmpl @@ -0,0 +1,9 @@ +{{template "base/head" .}} +
+
+
+ {{template "user/auth/signin_inner" .}} +
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/signin_inner.tmpl b/templates/user/auth/signin_inner.tmpl new file mode 100644 index 0000000..56532f4 --- /dev/null +++ b/templates/user/auth/signin_inner.tmpl @@ -0,0 +1,65 @@ +
+ {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn)}} + {{template "base/alert" .}} + {{end}} +

+ {{if .LinkAccountMode}} + {{ctx.Locale.Tr "auth.oauth_signin_title"}} + {{else}} + {{ctx.Locale.Tr "auth.login_userpass"}} + {{end}} +

+
+
+ {{.CsrfTokenHtml}} +
+ + +
+ {{if or (not .DisablePassword) .LinkAccountMode}} +
+ + +
+ {{end}} + {{if not .LinkAccountMode}} +
+
+ + +
+
+ {{end}} + + {{template "user/auth/captcha" .}} + +
+ +
+
+ + {{template "user/auth/oauth_container" .}} +
+
+ +
+ {{template "user/auth/webauthn_error" .}} + +
+ {{if .ShowRegistrationButton}} +
+ {{ctx.Locale.Tr "auth.hint_register" (printf "%s/user/sign_up" AppSubUrl)}} +
+
+ {{end}} + +
+
diff --git a/templates/user/auth/signin_openid.tmpl b/templates/user/auth/signin_openid.tmpl new file mode 100644 index 0000000..20c7bdc --- /dev/null +++ b/templates/user/auth/signin_openid.tmpl @@ -0,0 +1,51 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/signup.tmpl b/templates/user/auth/signup.tmpl new file mode 100644 index 0000000..1ce3934 --- /dev/null +++ b/templates/user/auth/signup.tmpl @@ -0,0 +1,9 @@ +{{template "base/head" .}} +
+
+
+ {{template "user/auth/signup_inner" .}} +
+
+
+{{template "base/footer" .}} diff --git a/templates/user/auth/signup_inner.tmpl b/templates/user/auth/signup_inner.tmpl new file mode 100644 index 0000000..6c5ac67 --- /dev/null +++ b/templates/user/auth/signup_inner.tmpl @@ -0,0 +1,64 @@ +
+

+ {{if .LinkAccountMode}} + {{ctx.Locale.Tr "auth.oauth_signup_title"}} + {{else}} + {{ctx.Locale.Tr "sign_up"}} + {{end}} +

+
+
+ {{.CsrfTokenHtml}} + {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister)}} + {{template "base/alert" .}} + {{end}} + {{if .DisableRegistration}} +

{{ctx.Locale.Tr "auth.disable_register_prompt"}}

+ {{else}} +
+ + +
+
+ + +
+ + {{if not .DisablePassword}} +
+ + +
+
+ + +
+ {{end}} + + {{template "user/auth/captcha" .}} + +
+ +
+ {{end}} + + {{template "user/auth/oauth_container" .}} +
+
+
+ +{{if not .LinkAccountMode}} +
+
+
+ {{ctx.Locale.Tr "auth.hint_login" (printf "%s/user/login" AppSubUrl)}} +
+
+
+{{end}} diff --git a/templates/user/auth/signup_openid_connect.tmpl b/templates/user/auth/signup_openid_connect.tmpl new file mode 100644 index 0000000..e4b7936 --- /dev/null +++ b/templates/user/auth/signup_openid_connect.tmpl @@ -0,0 +1,36 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/signup_openid_navbar.tmpl b/templates/user/auth/signup_openid_navbar.tmpl new file mode 100644 index 0000000..89068dd --- /dev/null +++ b/templates/user/auth/signup_openid_navbar.tmpl @@ -0,0 +1,12 @@ + +
+ + {{ctx.Locale.Tr "auth.openid_connect_title"}} + + {{if and .EnableOpenIDSignUp (not .AllowOnlyInternalRegistration)}} + + {{ctx.Locale.Tr "auth.openid_register_title"}} + + {{end}} +
+
diff --git a/templates/user/auth/signup_openid_register.tmpl b/templates/user/auth/signup_openid_register.tmpl new file mode 100644 index 0000000..c017a0e --- /dev/null +++ b/templates/user/auth/signup_openid_register.tmpl @@ -0,0 +1,37 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/twofa.tmpl b/templates/user/auth/twofa.tmpl new file mode 100644 index 0000000..d245239 --- /dev/null +++ b/templates/user/auth/twofa.tmpl @@ -0,0 +1,26 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/twofa_scratch.tmpl b/templates/user/auth/twofa_scratch.tmpl new file mode 100644 index 0000000..23ad77f --- /dev/null +++ b/templates/user/auth/twofa_scratch.tmpl @@ -0,0 +1,25 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/webauthn.tmpl b/templates/user/auth/webauthn.tmpl new file mode 100644 index 0000000..1b84765 --- /dev/null +++ b/templates/user/auth/webauthn.tmpl @@ -0,0 +1,25 @@ +{{template "base/head" .}} + +{{template "base/footer" .}} diff --git a/templates/user/auth/webauthn_error.tmpl b/templates/user/auth/webauthn_error.tmpl new file mode 100644 index 0000000..511ff7c --- /dev/null +++ b/templates/user/auth/webauthn_error.tmpl @@ -0,0 +1,13 @@ +
+
{{ctx.Locale.Tr "webauthn_error"}}
+
+
+
{{ctx.Locale.Tr "webauthn_unsupported_browser"}}
+
{{ctx.Locale.Tr "webauthn_error_unknown"}}
+
{{ctx.Locale.Tr "webauthn_error_insecure"}}
+
{{ctx.Locale.Tr "webauthn_error_unable_to_process"}}
+
{{ctx.Locale.Tr "webauthn_error_duplicated"}}
+
{{ctx.Locale.Tr "webauthn_error_empty"}}
+
{{ctx.Locale.Tr "webauthn_error_timeout"}}
+
+
-- cgit v1.2.3