Skip to content

Conversation

@RoxasShadow
Copy link

@RoxasShadow RoxasShadow commented Oct 4, 2021

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.

Target cschiewek#149.

Should not be a breaking change since both the code and the documentation
clearly state that `required_groups` members either are strings,
or must have only two elements when any member is an array.

The feature here is that we can list a number of groups after the attribute
and at least any of them has to be matched to be able to pass the verification.
@Greg-Myers-SB
Copy link

@RoxasShadow do you mean #149 ?

@RoxasShadow
Copy link
Author

@RoxasShadow do you mean #149 ?

Yes, that was a typo, thanks!

Copy link

@JaydaKad JaydaKad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work 👍

@RoxasShadow
Copy link
Author

> rspec spec/unit/connection_spec.rb
..............

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants