Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix searching for admin #114

Merged
merged 3 commits into from
Apr 14, 2022
Merged

Fix searching for admin #114

merged 3 commits into from
Apr 14, 2022

Conversation

crobibero
Copy link
Member

Current release sets everyone as admin... so that's an issue

@crobibero crobibero added the major-bug This PR fixes a major bug label Apr 14, 2022
Comment on lines 105 to 109
var adminBaseDn = LdapPlugin.Instance.Configuration.LdapAdminBaseDn;
if (string.IsNullOrEmpty(adminBaseDn))
{
adminBaseDn = ldapUser.Dn;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this at least partially breaks PR #113 that went in a couple weeks ago

@1337joe
Copy link
Member

1337joe commented Apr 14, 2022

On my server (fresh install when we hit beta) with the current plugin release (14) I'm seeing correct behavior regarding admin users having admin rights and other users not.

I think this is a result of the last pull request (specifically the change to search adminBaseDn instead of ldapUser.Dn), which isn't part of a release yet.

@crobibero
Copy link
Member Author

It may differ between LDAP implementations- I'm usin LLDAP, which doesn't support searching by a non ldap admin user.

While this implementation is likely slower as it queries for all admin users and then goes through the list, but at least there shouldn't be any false positives

@crobibero crobibero merged commit 2bd23b6 into master Apr 14, 2022
@crobibero crobibero deleted the admin-filter branch April 14, 2022 22:55
@cyberb cyberb mentioned this pull request Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-bug This PR fixes a major bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants