Skip to content

Commit

Permalink
providers/ldap: fix global search_full_directory permission not being…
Browse files Browse the repository at this point in the history
… sufficient (cherry-pick #12028) (#12030)

providers/ldap: fix global search_full_directory permission not being sufficient (#12028)

* providers/ldap: fix global search_full_directory permission not being sufficient



* use full name of permission



---------

Signed-off-by: Jens Langhammer <[email protected]>
Co-authored-by: Jens L. <[email protected]>
  • Loading branch information
gcp-cherry-pick-bot[bot] and BeryJu authored Nov 15, 2024
1 parent 66a4970 commit 3ae0001
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion authentik/providers/ldap/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ def check_access(self, request: Request, pk) -> Response:
access_response = PolicyResult(result.passing)
response = self.LDAPCheckAccessSerializer(
instance={
"has_search_permission": request.user.has_perm("search_full_directory", provider),
"has_search_permission": (
request.user.has_perm("search_full_directory", provider)
or request.user.has_perm("authentik_providers_ldap.search_full_directory")
),
"access": access_response,
}
)
Expand Down

0 comments on commit 3ae0001

Please sign in to comment.