[4.0] CPanel: Fix access rights for edit and unpublish button#24581
Merged
wilsonge merged 3 commits intojoomla:4.0-devfrom Apr 14, 2019
Merged
[4.0] CPanel: Fix access rights for edit and unpublish button#24581wilsonge merged 3 commits intojoomla:4.0-devfrom
wilsonge merged 3 commits intojoomla:4.0-devfrom
Conversation
Quy
reviewed
Apr 13, 2019
| $canEdit = $user->authorise('core.edit', 'com_modules.module.' . $id) && $user->authorise('core.manage', 'com_modules'); | ||
|
|
||
| $canChange = $user->authorise('core.edit.state', 'com_modules.module.' . $id) && $user->authorise('core.manage', 'com_modules'); | ||
|
|
Member
|
Look also at |
Member
|
On review. I have tested this item ✅ successfully on a89d2f6 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/24581. |
Contributor
|
Thanks! |
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.
Summary of Changes
On cPanel, users with appropriate permissions can edit or/and activate/deactivate Modules.
This PR fixes checks for access rights
Testing Instructions
You need a user in a user group with following permissions:
Cannot Edit in com_modules but can EditState
You need some modules on cPanel.
Try the coq for editiing the module or its state.
Expected result
The Button Unpublish is visible
Actual result
There are no buttons