mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-15 15:30:26 +00:00
This PR is in preparation of, but independent of, an upcoming suggestion for a feature addition: * The first commit moves a tiny bit of logic into a separate function to prepare for extension of that logic, avoiding duplication * The second commit moves checking for disabled registrations earlier, which, I think, has merits in terms of performance and resilience (hopefully not significant, but who knows?) * The third commit adds simple unit tests for SignUp() and SignUpPost() to avoid the long-ish roundtrip over integration tests * The forth commit introduces `ctx.Data["DisableRegistrationReason"]` for the signup template to use as the reason printed if `.DisableRegistration` to prepare for other reasons to be added Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/10915 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Nils Goroll <nils.goroll@uplex.de> Co-committed-by: Nils Goroll <nils.goroll@uplex.de> |
||
|---|---|---|
| .. | ||
| 2fa.go | ||
| auth.go | ||
| auth_test.go | ||
| linkaccount.go | ||
| main_test.go | ||
| oauth.go | ||
| oauth_test.go | ||
| openid.go | ||
| password.go | ||
| webauthn.go | ||