Skip to content

Commit

Permalink
search_filter is allow config
Browse files Browse the repository at this point in the history
allowed_groups still narrows the match
  • Loading branch information
minrk committed Sep 17, 2024
1 parent 321f072 commit a5cfed7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ldapauthenticator/ldapauthenticator.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,11 @@ async def check_allowed(self, username, auth_model):
allowed = await allowed
if allowed is True:
return True
if self.search_filter and not self.allowed_groups:
# search_filter was specified
# consider matching this filter sufficient to allow access
# _IF_ allowed_groups is unspecified
return True
if self.allowed_groups:
# check allowed groups
in_groups = set((auth_model.get("auth_state") or {}).get("ldap_groups", []))
Expand Down

0 comments on commit a5cfed7

Please sign in to comment.