First system user created upon logging in via LDAP is not marked as admin #475

Closed
opened 2025-11-02 03:24:49 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @strk on GitHub (Mar 10, 2017).

Version 1.1.0.
Start with an empty database, configure usage of LDAP.
Login via LDAP results in automatic creation of local user record corresponding to the LDAP record, but even if that's the very first local user created, such user is not marked as administrator, which results in a system with no administrator users.

I'm not sure if this is a regression or not, didn't try with 1.0.x

Originally created by @strk on GitHub (Mar 10, 2017). Version 1.1.0. Start with an empty database, configure usage of LDAP. Login via LDAP results in automatic creation of local user record corresponding to the LDAP record, but even if that's the very first local user created, such user is *not* marked as administrator, which results in a system with no administrator users. I'm not sure if this is a regression or not, didn't try with 1.0.x
GiteaMirror added the type/questionissue/stale labels 2025-11-02 03:24:49 -06:00
Author
Owner

@pgaskin commented on GitHub (Mar 10, 2017):

I don't think it's a regression, I just tried it myself.

Also, can you review go-gitea/docs#99 and go-gitea/gitea#1207 😄

@pgaskin commented on GitHub (Mar 10, 2017): I don't think it's a regression, I just tried it myself. Also, can you review go-gitea/docs#99 and go-gitea/gitea#1207 :smile:
Author
Owner

@lunny commented on GitHub (Mar 11, 2017):

How does first user login via LDAP?

@lunny commented on GitHub (Mar 11, 2017): How does first user login via LDAP?
Author
Owner

@strk commented on GitHub (Mar 11, 2017):

@lunny now this is a good question. In my case I created an admin user, added the loginSource then removed the admin user. But in general you're right that's currently not straightforward to enable LDAP w/out first creating an admin user. That's a problem addressed in #183

@strk commented on GitHub (Mar 11, 2017): @lunny now this is a good question. In my case I created an admin user, added the loginSource then removed the admin user. But in general you're right that's currently not straightforward to enable LDAP w/out first creating an admin user. That's a problem addressed in #183
Author
Owner

@lunny commented on GitHub (Mar 11, 2017):

So delete the last user is a deny operation we should send a PR to do that.

@lunny commented on GitHub (Mar 11, 2017): So delete the last user is a deny operation we should send a PR to do that.
Author
Owner

@stale[bot] commented on GitHub (Feb 16, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Feb 16, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Mar 2, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Mar 2, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#475