-
Notifications
You must be signed in to change notification settings - Fork 4
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 valuator's permissions #102
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #102 +/- ##
==========================================
+ Coverage 94.33% 94.65% +0.31%
==========================================
Files 66 67 +1
Lines 1413 1516 +103
==========================================
+ Hits 1333 1435 +102
- Misses 80 81 +1
☔ View full report in Codecov by Sentry. |
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.
This PR needs specs
if current_participatory_space.user_roles(:valuator).where(user: current_user).empty? | ||
Suggestion.where(suggestable: document).or(Suggestion.where(suggestable: document.sections)) | ||
else | ||
valuator_roles = current_participatory_space.user_roles(:valuator).where(user: current_user) |
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.
We could probaly extract this in a private method and used in the "if" before
@microstudi I added tests, did some refactoring. Сould you do the review again |
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.
looks good!
No description provided.