Avoid user_manager permissions to shadow space admin permissions#5698
Merged
tramuntanal merged 5 commits intomasterfrom Feb 11, 2020
Merged
Conversation
…ow_space_admin_permissions
mrcasals
reviewed
Feb 11, 2020
| **Fixed**: | ||
|
|
||
| - **decidim-admin**: Avoid user_manager permissions to shadow space admin permissions. [\#5698](https://github.com/decidim/decidim/pull/5698) | ||
| - **decidim-core**: Fix: display the correct google brand log in omniauth login view. [\#5685](https://github.com/decidim/decidim/pull/5685) |
Contributor
There was a problem hiding this comment.
Are these changes intended? Maybe they come from older code?
Contributor
Author
There was a problem hiding this comment.
You are right, there's a duplicated line that appeared when resolving the typo in master's changelog.
Contributor
There was a problem hiding this comment.
This line is still duplicated! 😄
mrcasals
previously approved these changes
Feb 11, 2020
Contributor
mrcasals
left a comment
There was a problem hiding this comment.
Looks good to me! I left a note about some changes in the Changelog file, but apart from that PR looks good 😄
| def collection | ||
| # there's an unidentified corner case where Decidim::User | ||
| # may have been destroyed, but the related ParticipatorySpacePrivateUser | ||
| # remains in the database. That's why filtering by not null users |
| return user_manager_permissions if user_manager? | ||
| if user_manager? | ||
| begin | ||
| allow! if user_manager_permissions.allowed? |
microstudi
previously approved these changes
Feb 11, 2020
…ow_space_admin_permissions
One dulpicated entry and many lines without closing the markdown link with ).
aa9d236
microstudi
approved these changes
Feb 11, 2020
2 tasks
microstudi
pushed a commit
to Platoniq/decidim
that referenced
this pull request
Feb 21, 2020
…idim#5698) * Avoid user_manager permissions to shadow space admin permissions * Add changelog entry. * Correct changelog entries One dulpicated entry and many lines without closing the markdown link with ).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎩 What? Why?
When a user has both, the
user_managerrole and the participatory spaceadminrole, the admin menu does not render the participatory space menu option.This is because
Decidim::Admin::Permissions#permissionsreturns after evaluating the permissions of auser_managerwhatever the result. In the exposed case, the correct is to continue evaluating to check if the user has other roles that allow her to perform the action.📌 Related Issues
📋 Subtasks
CHANGELOGentry📷 Screenshots (optional)