You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I took over some code so bare with me here, just trying to figure this out:
we are using version 2.2.2:
This works, however if a user is a member of a group that is a subgroup, we aren't able to determine that, is there a way to specify that we want to expand the memberof to include the subgroups that he/she belongs to?
var approved = 0;
ldapconfig.permittedGroups.forEach(function(p) {
user.memberOf.forEach(function(g) {
console.log(g);
if(g == p.group) {
console.log('Hey this group matched!!!');
// Choose the smallest non-zero value encountered
if(!approved || (approved > p.security)) {
approved = p.security;
}
console.log(creds.username + " in approved group " + p.group + " with security " + p.security);
}
});
});
Right now I only get the groups this user is spefically a member of, if he/she is a member of a child group of another group we never know with this code. Is there a better/easier way to determine what parent groups the user is a member of?
Thanks in advance.
The text was updated successfully, but these errors were encountered:
I took over some code so bare with me here, just trying to figure this out:
we are using version 2.2.2:
This works, however if a user is a member of a group that is a subgroup, we aren't able to determine that, is there a way to specify that we want to expand the memberof to include the subgroups that he/she belongs to?
var approved = 0;
ldapconfig.permittedGroups.forEach(function(p) {
user.memberOf.forEach(function(g) {
console.log(g);
if(g == p.group) {
console.log('Hey this group matched!!!');
// Choose the smallest non-zero value encountered
if(!approved || (approved > p.security)) {
approved = p.security;
}
console.log(creds.username + " in approved group " + p.group + " with security " + p.security);
}
});
});
Right now I only get the groups this user is spefically a member of, if he/she is a member of a child group of another group we never know with this code. Is there a better/easier way to determine what parent groups the user is a member of?
Thanks in advance.
The text was updated successfully, but these errors were encountered: