-
Notifications
You must be signed in to change notification settings - Fork 7
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
[Debt] Update how roles are set as part of communities changes #10791
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10791 +/- ##
============================================
+ Coverage 38.61% 38.66% +0.04%
- Complexity 1654 1695 +41
============================================
Files 1013 1013
Lines 30906 30980 +74
Branches 6442 6450 +8
============================================
+ Hits 11934 11977 +43
- Misses 18797 18827 +30
- Partials 175 176 +1
Flags with carried forward coverage won't be shown. Click here to find out more. β View full report in Codecov by Sentry. |
Okay @tristan-orourke I did the suggested sync removal in 7e2d841 and the replace/deprecate in 7c660bb Thoughts on things so far? Right direction? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on the frontend, I like how you got replaced sync with attach & detach.
The downside is that the UserPolicy->updateRoles method is real ugly, now. π And I expected that, but now that I see it I have a suggestion. What if we create a mutation class to handle updateUserRoles, and move some of the logic (especially for processing the input) from the Policy to there? The goal would be to end up with a policy method (or possibly break it down into several) which is straightforward and easy to read.
I'm not sure I follow. The policy check precedes the mutation, so I don't see how you can shift the logic into the latter. The operation itself is complex given it involves attach and detach, team-based roles. non-team roles, and all the possible roles and permissions present. I don't know how we can circumvent a complex policy check given it is a complex authorization process short of refactoring the role mutations in the front and back into separate granular mutations for each single role you can add/remove. |
π€ Resolves #10351
π Introduction
Describe what this PR is solving.
π΅οΈ Details
Add any additional details that could assist with reviewing or testing this PR.
π§ͺ Testing
Assist reviewers with steps they can take to test that the PR does what it says it does.
πΈ Screenshot
Add a screenshot (if possible).
π Deployment
Add any additional details that are required for deploying the application.
Examples of when this is required include: