-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DIRSERVER-1844 adding automatic memberOf attributes #23
base: master
Are you sure you want to change the base?
Conversation
@elecharny can you give a pointer for testing this? |
Looks like my best try is going to be SimpleBindIT as a template. will give it a go. |
Hi Daan, sorry for the delay, was just under the water those last days... I'm integrating your code and reviewing it. |
Hi @elecharny thanks. I think it is far from done. I left some todo like comments and doe not know if this is easily testable in a short development cycle. please if you feel like give some more guidance. |
Hello all, I need this functionality too, so I've had a look yesterday. I've managed to advance quite a bit but I got stuck, so I'd like to ask for some input. Attached below is my current code (I can clean it up and do a proper PR once it works). TL;DR: how do you use an ExprNode in an EntryFilter? What currently works:
What doesn't:
My approach in search is that I first remove any part of the filter ExprNode that checks memberOf (otherwise it returns empty since the attribute isn't set on entries):
Then I call next, and on the resulting cursor I add a filter that adds the memberOf attributes. Finally, I should apply the original ExprNode filter on the modified entry that now has memberOf. But I can't for the life of me figure out how to do that. Any help would be most welcome :-) Thanks, |
thanks for stepping up @alesuiss, I have a question on your approach; intuitively I'd say with a member of filter, you would start at the group for which membership is required and then go through the rest of the filters on the resulting members, after adding the automating attribute. Why do you keep it for last? BTW feel free to use my commits (under apache 2 license) or create PR to my branch and we can join forces. |
AFAIK all I can do is 1) act on the query string and 2) act on the result cursor to filter. But I'm totally new to this codebase, and maybe my approach is not the right/best one. But I'm pretty sure it would work :-) if only I could figure out how to use that damn ExprNode |
not sure what the WIP and PoC procedures in this project are. I think the discussion on this on the mail list and in the jira ticket is about to conclude but not quite yet. this to get familiar with the code and see if i am in the right direction/ask question. please review if you will.