go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.62k stars 5.45k forks source link

Add an option to ask users to change their passwords on the Edit User Account page #18815

Open rcdevice opened 2 years ago

rcdevice commented 2 years ago

Feature Description

Our team does not allow users to register themselves ,the administrator assigns the initial user account and password instead. However, when some users log in for the first time, they change their passwords to the original ones, which reduces login security because the initial passwords of all users are the same .

I wish the Gitea team to provide an OPTION on the Edit User Account page to prompt the user to change his password when the next time he login. Once he does, this option will be automatically unchecked the next time the administrator enters the current user's account management page. the administrator can determine whether the user has changed the password based on this OPTION check status. the new password cannot be the same as the previous one.

Screenshots

Snap8

lunny commented 2 years ago

I think you mean require user to change password in next login? And when next time user login and changed their password, this option will be updated as unchecked.

rcdevice commented 2 years ago

I think you mean require user to change password in next login? And when next time user login and changed their password, this option will be updated as unchecked.

exactly yes

MorganAbrams commented 10 months ago

This seems to of existed in a previous Gitea version (before 1.21.1) based on the FAQ. It makes it seem like the Admin could previously force the user to change it on next login already like this and not just from CLI commands.

image

jolheiser commented 10 months ago

@MorganAbrams I'm surprised this hasn't been reported before, those docs have been misleading since I wrote them back in 1.10 :see_no_evil: https://github.com/go-gitea/gitea/pull/8883

https://github.com/go-gitea/gitea/blob/4d876ab1c8f2bca3bdbfa9091821267ade938bf3/routers/admin/users.go#L210-L226

https://github.com/go-gitea/gitea/blob/4d876ab1c8f2bca3bdbfa9091821267ade938bf3/templates/admin/user/edit.tmpl#L68-L105

I will update them for now, though I think this is still a valid enhancement request!