gitea/services/user
Andrew Melnick 688430e3ce
Allow admins to rename non-local users (#35970)
Presently, attempting to rename a non-local (e.g. Oauth2 or LDAP) user
results in an error, even if the requester is an administrator. As far
as I can tell, this is a security feature, not architectural in nature,
as automatic account linking could be used to take control of another
user's account. This is not a concern for an administrator, who we
should trust to know what they are doing.

This patch allows admins, and only admins, to rename non-local users.

Fixes https://github.com/go-gitea/gitea/issues/18308 (sort of)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-23 20:59:55 +00:00
..
avatar.go Fix avatar upload error handling (#35887) 2025-11-07 09:44:09 +08:00
block_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
block.go Refactor repository transfer (#33211) 2025-01-30 05:40:44 +00:00
delete.go
email_test.go Replace gobwas/glob package (#35478) 2025-09-13 18:01:00 +00:00
email.go
update_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
update.go enforce nolint scope (#34851) 2025-06-27 07:59:55 +02:00
user_test.go Allow admins to rename non-local users (#35970) 2025-11-23 20:59:55 +00:00
user.go Allow admins to rename non-local users (#35970) 2025-11-23 20:59:55 +00:00