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(ability): negates inverted rules in ruleToAST #602

Merged
merged 1 commit into from Apr 30, 2022

Conversation

ccatterina
Copy link
Contributor

Hi @stalniy,
I'm really sorry for the situation in Ukraine, I hope this stupid war can end as soon as possible.
Obviously I don't expect that you look at this PR before the end of this situation.

Thank you!

The inverted rules must be negated in order to build the correct AST condition.
@codecov-commenter
Copy link

codecov-commenter commented Mar 3, 2022

Codecov Report

Merging #602 (e4fe8d2) into master (9f91ac4) will decrease coverage by 0.21%.
The diff coverage is 92.10%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #602      +/-   ##
==========================================
- Coverage   93.95%   93.74%   -0.22%     
==========================================
  Files          32       32              
  Lines         711      719       +8     
  Branches      167      175       +8     
==========================================
+ Hits          668      674       +6     
- Misses         12       13       +1     
- Partials       31       32       +1     
Impacted Files Coverage Δ
...ckages/casl-prisma/src/prisma/PrismaQueryParser.ts 93.84% <75.00%> (-1.07%) ⬇️
packages/casl-mongoose/src/accessible_records.ts 80.00% <88.88%> (-5.19%) ⬇️
packages/casl-ability/src/utils.ts 95.23% <91.30%> (-0.82%) ⬇️
packages/casl-ability/src/RuleIndex.ts 94.87% <95.23%> (+0.42%) ⬆️
packages/casl-ability/src/extra.ts 91.89% <100.00%> (ø)
packages/casl-ability/src/structures/LinkedItem.ts 100.00% <100.00%> (ø)
packages/casl-angular/src/AbilityModule.ts 100.00% <100.00%> (ø)
packages/casl-angular/src/pipes.ts 100.00% <100.00%> (+4.16%) ⬆️
packages/casl-mongoose/src/accessible_fields.ts 95.23% <100.00%> (ø)
packages/casl-mongoose/src/mongo.ts 100.00% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1155c56...e4fe8d2. Read the comment docs.

@stalniy stalniy merged commit c1bdc60 into stalniy:master Apr 30, 2022
@stalniy
Copy link
Owner

stalniy commented Apr 30, 2022

Nice catch! Thank you!

will be released in about 2 weeks don’t access to my laptop at the moment

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.

None yet

3 participants