-
Notifications
You must be signed in to change notification settings - Fork 16
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
The logic for AllNotIn and AnyNotIn are the wrong way around #27
Comments
Hi @SpoonMeise , thanks for pointing this out! I'll have a look and get back to you |
My particular case, the subject can have multiple roles, and I'm checking if those roles do or do not contain a role I am interested in. It would make the policies easier to read if there were I'm interested in the policies being easier to read because it'll be easier to avoid mistakes, and I'm hoping that I can get non-developers to manage the policies. |
Just had a look, the implementation of I believe your use-case can be supported by using the Regarding renaming the conditions, I think its a good idea if it makes the policy easier to read and would be more than happy to include it as a feature. Unfortunately, I might not be able to get on it for while. Would you like to open a PR and give it a try? I think one approach of achieving this is by driving a new named class from |
If the implementation is correct, the documentation isn't misleading, it's plain wrong. The documentation for
Yet the test here is
Again, To my mind, the documentation matches what the names of the conditions intuitively imply, and the implementations don't. If the implementation is what you think it should be, the documentation and the names of the conditions ought to be changed. |
I'm happy to make a PR, but we ought to agree on what it should change first :) |
Yes, the documentation is wrong and needs to be corrected. The basic idea around these conditions is checking for subsets, i.e. one is subset of another. When writing the documentation I thought that would not be user friendly so decided of not using such. Maybe describing in terms of sets would be more clear? Any suggestions? :) |
Conditions for collections. Take for example,
AllNotIn
, the documentation says:Yet the test is:
https://github.com/ketgo/py-abac/blob/master/tests/test_policy/test_conditions/test_collection.py#L80
Of the 2 values for the attribute value collection (
1
and2
),2
is a member of "values", so the condition should returnFalse
.The text was updated successfully, but these errors were encountered: