cschiewek / devise_ldap_authenticatable

Devise Module for LDAP
MIT License
594 stars 359 forks source link

Check if user is present in any of multiple possible group names #271

Open RoxasShadow opened 2 years ago

RoxasShadow commented 2 years ago

Hello nice folk 😄

This PR is an attempt at implementing the feature request in #149, which happens to be also something that my team at @simplybusiness needs as well.

In order to not introducing any breaking changes, I have made possible to add additional elements to any array member of required_groups so that we can introduce exclusive operations in without touching any of the inclusive logic operation that are done among all the members of required_groups.

I hope this make sense to you. I haven't seen any tests covering the #in_required_groups? part of #authorized? - I will try to add something here as soon as I am able to run the whole tests suite in my local machine.

Thank you.

Greg-Myers-SB commented 2 years ago

@RoxasShadow do you mean #149 ?

RoxasShadow commented 2 years ago

@RoxasShadow do you mean #149 ?

Yes, that was a typo, thanks!

RoxasShadow commented 2 years ago
> rspec spec/unit/connection_spec.rb
..............

Finished in 0.04252 seconds (files took 1.86 seconds to load)
14 examples, 0 failures