Skip to content
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

Fix numeric eACL processing #573

Merged
merged 3 commits into from
Mar 27, 2024
Merged

Fix numeric eACL processing #573

merged 3 commits into from
Mar 27, 2024

Conversation

cthulhu-rider
Copy link
Contributor

Previously, to see 'a OP b' in test cases reader should place set 'a' to
the right value and 'b' to the left one. Swapping makes condition desc
more natural for eyes and easier to understande.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Most of 'a OP b' conditions had incorrect boolean flag to check. Due to
this, test could not detect the bug.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
Previously, `Validator` calculated action for eACL with numeric rules
incorrectly. This was caused by inverted comparison of filter and object
header values. For example, if rule is applied only to 'attr < 0',
the rule was applied to objects with 'attr = 1' and not applied to
objects with 'attr = -1'.

Now condition is inverted and numeric rules are matched correctly. This
also fixes corresponding unit test.

Signed-off-by: Leonard Lyubich <leonard@morphbits.io>
@roman-khimov roman-khimov merged commit bed3d59 into master Mar 27, 2024
7 of 10 checks passed
@roman-khimov roman-khimov deleted the bugfix/eacl-numeric branch March 27, 2024 16:44
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.

2 participants