Commit graph

3 commits

Author SHA1 Message Date
Gusted
46e60ce966 fix: load settings for valid user and email check (#6674)
- The doctor commands to check the validity of existing usernames and
email addresses depend on functionality that have configurable behavior
depending on the values of the `[service]` settings, so load them when
running the doctor command.
- Resolves #6664
- No unit test due to the architecture of doctor commands.

# Testing

1. Set `[service].ALLOW_DOTS_IN_USERNAMES = true`.
2. Create a user that contains a dot in their username.
3. Run the `check-user-name` doctor command and verify there's no error reported.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6674
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-01-24 12:23:15 +00:00
Solomon Victorino
471567b3ba fix: use ValidateEmail as binding across web forms 2024-08-28 22:25:17 -06:00
Lunny Xiao
62f995203a
Move doctor package from modules to services (#28856) 2024-01-20 10:07:31 +08:00
Renamed from modules/doctor/breaking.go (Browse further)