Updating "Is Administrator" attribute for LDAP users on each login? #4972

Closed
opened 2025-11-02 06:09:36 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @mikerenfro on GitHub (Feb 28, 2020).

  • Gitea version (or commit ref): 1.11.1
  • Git version: 1.8.3.1
  • Operating system: RHEL 7.7
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

It looks like the "Is Administrator" attribute for a user account is only set on initial account creation. We're authenticating all of our users from LDAP (specifically Active Directory), and we'd like to set their administrative access from the results of the Admin Filter query on each login. That is, if we remove a user from the group we use in the Admin Filter, they lose administrative access to Gitea on their next login.

Originally created by @mikerenfro on GitHub (Feb 28, 2020). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.11.1 - Git version: 1.8.3.1 - Operating system: RHEL 7.7 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description It looks like the "Is Administrator" attribute for a user account is only set on initial account creation. We're authenticating all of our users from LDAP (specifically Active Directory), and we'd like to set their administrative access from the results of the Admin Filter query on each login. That is, if we remove a user from the group we use in the Admin Filter, they lose administrative access to Gitea on their next login.
Author
Owner

@6543 commented on GitHub (Feb 28, 2020):

this should be working with 1.11.1: #8849

@6543 commented on GitHub (Feb 28, 2020): this should be working with 1.11.1: #8849
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4972