Closed velrest closed 6 years ago
Yes of course, please open a PR. I’m very open to all PRs if they serve a purpose for more than one spesific use case :)
Thanks. I merged the PR and then looked at the code base and remembered that groupSearchFilter
can be a function too, so you could have achieved this without a PR by passing
const opts = {
...
groupSearchFilter: (user) =>
'yoursearchfilter'
.replace(/{{dn}}/g, user[opts.groupDnProperty])
.replace(/{{username}}/g, user.uid)
};
But, it's fine having that in the default one too. I'll see what to do with another PR and then release this at some point.
I think
{{username}}
should be available in thegroupSearchFilter
. This would require to edit this line. This would allow to filter groups bymemberUid
.I would gladly open a PR if this is acceptable.