Allow user name "admin" to be created #13559

Closed
opened 2025-11-02 10:46:01 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @dacrudg on GitHub (Oct 2, 2024).

Description

auth.go:570:createUserInContext() [E] CreateUser: name is reserved [name: admin]

Why can't we create a user named admin? This causes issues with my SSO setup where I use "admin" across all services, so now Gitea breaks when I login with SSO it tries to create that user and fails.

Gitea Version

1.19.0 and 1.22.2

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Myself in docker

Database

MySQL/MariaDB

Originally created by @dacrudg on GitHub (Oct 2, 2024). ### Description auth.go:570:createUserInContext() [E] CreateUser: name is reserved [name: admin] Why can't we create a user named admin? This causes issues with my SSO setup where I use "admin" across all services, so now Gitea breaks when I login with SSO it tries to create that user and fails. ### Gitea Version 1.19.0 and 1.22.2 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? Myself in docker ### Database MySQL/MariaDB
GiteaMirror added the type/proposal label 2025-11-02 10:46:01 -06:00
Author
Owner

@eeyrjmr commented on GitHub (Oct 2, 2024):

There is a reserved list
9fd8b2621f/models/user.go (L715)

Probably to protect their usage elsewhere. There is an issue to permit some flexibility over this

@eeyrjmr commented on GitHub (Oct 2, 2024): There is a reserved list https://github.com/go-gitea/gitea/blob/9fd8b2621fb6e25e5cce7a5b5b08a993a145bc78/models/user.go#L715 Probably to protect their usage elsewhere. There is an issue to permit some flexibility over this
Author
Owner

@lunny commented on GitHub (Oct 2, 2024):

This user name was reserved because of the router conflicts. /admin now will display the administrator console. But maybe we can use /-/admin instead.

@lunny commented on GitHub (Oct 2, 2024): This user name was reserved because of the router conflicts. `/admin` now will display the administrator console. But maybe we can use `/-/admin` instead.
Author
Owner

@dacrudg commented on GitHub (Oct 3, 2024):

This user name was reserved because of the router conflicts. /admin now will display the administrator console. But maybe we can use /-/admin instead.

That would be great! And much appreciated

@dacrudg commented on GitHub (Oct 3, 2024): > This user name was reserved because of the router conflicts. `/admin` now will display the administrator console. But maybe we can use `/-/admin` instead. That would be great! And much appreciated
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13559