Skip to content

Fix searching for admin#114

Merged
crobibero merged 3 commits into
masterfrom
admin-filter
Apr 14, 2022
Merged

Fix searching for admin#114
crobibero merged 3 commits into
masterfrom
admin-filter

Conversation

@crobibero

Copy link
Copy Markdown
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
Copy Markdown
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

1337joe commented Apr 14, 2022

Copy link
Copy Markdown
Member

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
Copy Markdown
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