Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config option to disable password reset via mail #8187

Open
1 of 3 tasks
david-oswald opened this issue Sep 15, 2019 · 2 comments
Open
1 of 3 tasks

Add config option to disable password reset via mail #8187

david-oswald opened this issue Sep 15, 2019 · 2 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@david-oswald
Copy link

  • Gitea version (or commit ref): v1.9.3
  • Operating system: n/a
  • Database (use [x]): n/a
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist: n/a

Description

For centrally administrated installations, it might be desirable to disable password resets via email (which bypasses any 2FA) and instead require the admin to do that through the admin interface or via the terminal.

Currently, the only solution to achieve that seems to be to disable the mailer completely, which in turn disables other useful features like notifications.

Hence, it would be great to add a config.ini option similar to DISABLE_REGISTRATION, e.g. DISABLE_EMAIL_PASSWORD_RESET (default value false).

I think the required changes are relatively limited, mainly adding the option here:

https://github.com/go-gitea/gitea/blob/6dbd26185203d464c4a4e32e7af04a34f37ae4f2/modules/setting/service.go

and checking for the new option in addition to setting.MailService here:

I currently don't have a dev setup for gitea to implement that and send a PR, so if somebody else wants to pick this up that'd be great - however I can also give it a try if the backlog is already too full.

Great project overall btw, keep on the good work.

@lunny lunny added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Sep 15, 2019
@plinss
Copy link

plinss commented Mar 5, 2024

Somewhat related, when using an external authentication system, like LDAP, often there's a different site used to handle password resets. A configurable URL to direct users to the proper password reset mechanism would be useful and somewhat more user friendly than disabling password resets entirely (which may still be necessary if there isn't an external reset service).

@lunny
Copy link
Member

lunny commented Mar 5, 2024

related with #20549

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

3 participants