-
Notifications
You must be signed in to change notification settings - Fork 146
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
attributes for include membership #22
Comments
Can you clarify or give a pseudocode example of what you're trying to accomplish? |
yes of course: var opts = _.defaults(opts || {}, {
filter: '(member='+parseDistinguishedName(dn)+')',
scope: 'sub',
attributes: [ 'objectCategory', 'groupType', 'distinguishedName', 'cn' ]
}); so when i look for user i get back something like this:
and i want to add more attributes to the groups array for example i want it to be (with the objectSid):
the problem is there is no way to change the groups' attribute inside the get membership. |
hi, |
I believe the .on('entry', function(item, result, callback) { ... } that we've discussed would take care of this need / request for you. |
hi, or you meant to move all the include membership logic to occur on this event, but this move this implementation to the user of ad.js. which means, if now he only need to set one param to true when calling search and the library would take care of this, in the future he will need to implement everything by itself inside his event, means all of the following code will move from ad.js to the user event.
|
Sorry. You're right. I remember what the problem is / thanks for refreshing my memory. The solution should be pretty simple. Basically, I just need to change the query to use the defaultAttributes.group array which can be overridden on create. I'll get something pushed shortly. |
See the following commit: a44a7a2 Let me know if that solves your problem. My tests indicates that it should. If so, we'll get this closed. |
i will check it tomorrow when i get to my office. |
worked as expected:) |
hi,
the include membership get an opts object.
but there is no way to change it from outside, because it's internal function.
maybe we need to find a way to pass this object to this internal function.
(for example, in my mongo i save a ref from user to his groups, and i need to save the objectSid because the group dn can be change).
i don't want to change the attributes in include membership hard coded but to pass this somehow.
any ideas?
The text was updated successfully, but these errors were encountered: