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 (#12028)

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

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* use full name of permission

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu authored Nov 14, 2024
1 parent bcb91d2 commit c9036f8
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 c9036f8

Please sign in to comment.