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.11k stars 5.41k forks source link

Option to lock full name when using external auth sources #31958

Open thezzisu opened 1 week ago

thezzisu commented 1 week ago

Feature Description

In certain scenarios (such as within schools), users registered through external authentication need to maintain their real names.

Since names may contain Unicode characters (like a Chinese name), a good practice is to set DEFAULT_SHOW_FULL_NAME=true and set the user's full name to their real name. In this situation, it's necessary to ensure that external users cannot modify their own full name.

An option like EXTERNAL_USER_LOCK_FULL_NAME would be great to fit this need.

Screenshots

image

thezzisu commented 1 week ago

I am currently writing a PR for this. Also, a working example is implemented in a fork, but I think it would be better to have this functionality built-in.