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

Add ability to check update and delete policies outside of mutation #30

Merged
merged 1 commit into from
Jun 2, 2020

Conversation

wschurman
Copy link
Member

Why

Closes #21.

How

Add a set of new static methods that we've found would be useful in expo server.

Test Plan

Run new tests.

@wschurman wschurman requested review from ide and jkhales June 1, 2020 20:54
@codecov
Copy link

codecov bot commented Jun 1, 2020

Codecov Report

Merging #30 into master will increase coverage by 0.69%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #30      +/-   ##
==========================================
+ Coverage   88.48%   89.17%   +0.69%     
==========================================
  Files          63       63              
  Lines        1138     1146       +8     
  Branches       97       97              
==========================================
+ Hits         1007     1022      +15     
+ Misses         62       55       -7     
  Partials       69       69              
Flag Coverage Δ
#integration 89.17% <100.00%> (+0.69%) ⬆️
#unittest 89.17% <100.00%> (+0.69%) ⬆️
Impacted Files Coverage Δ
packages/entity/src/Entity.ts 92.30% <100.00%> (+25.64%) ⬆️
packages/entity/src/ReadonlyEntity.ts 100.00% <100.00%> (+5.88%) ⬆️
...ges/entity/src/ViewerScopedEntityMutatorFactory.ts 100.00% <0.00%> (+16.66%) ⬆️
...ckages/entity/src/testfixtures/SimpleTestEntity.ts 100.00% <0.00%> (+26.66%) ⬆️

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 3bacecb...32f578e. Read the comment docs.

Copy link

@jkhales jkhales left a comment

Choose a reason for hiding this comment

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

Super useful

@wschurman wschurman merged commit 0de7cf1 into master Jun 2, 2020
@wschurman wschurman deleted the @wschurman/policy-evaluation branch June 2, 2020 17:00
* @param existingEntity - entity loaded by viewer
* @param queryContext - query context in which to perform the check
*/
static async canViewerDelete<
Copy link
Member

Choose a reason for hiding this comment

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

-Async

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah nice catch!

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.

Add ability to run update/delete privacy policy outside of mutator
3 participants