Closed SelfDevTV closed 4 years ago
Are you suggesting to change the default, which is recursive search? Please don't change the default, it would break existing applications. Actually, function isUserMemberOf without recursion does not make sense to me. If recursion is not what you want, you may as well simply look at the memberOf attribute of the user.
@jurjendijkstra Yeah it was for my use case where I want to check for a specific group that my user is memberOf. But he is in so many groups that I get a timeout. But I solved it in another way like you suggested :)
I think I can close this, but maybe you can have a look at my other issue I just opened 👍 Thx man
Hiho,
I have a problem with
isUserMemberOf
. I use this function to authorize users in my application. Unfortunately it doesn't work since my user is in many many groups (huge groups). It will timeout eventually. I have turned on logging and I in fact see 1000 of lines of logs with group names he goes through.So my Idea is to only search for the direct members when no options are specified and only search through all groups (recursively) when options are provided.