Skip to content

[4.0] CPanel: Fix access rights for edit and unpublish button#24581

Merged
wilsonge merged 3 commits intojoomla:4.0-devfrom
chmst:chrome-well-access-rights-check
Apr 14, 2019
Merged

[4.0] CPanel: Fix access rights for edit and unpublish button#24581
wilsonge merged 3 commits intojoomla:4.0-devfrom
chmst:chrome-well-access-rights-check

Conversation

@chmst
Copy link
Contributor

@chmst chmst commented Apr 13, 2019

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

screen shot 2019-04-13 at 21 02 52

Actual result

There are no buttons

@chmst chmst changed the title Fix access rights for edit and unpublish button [4.0] CPanel: Fix access rights for edit and unpublish button 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');

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove tab.

@infograf768
Copy link
Member

Look also at
#24583
First merged, first served... ;)

@infograf768
Copy link
Member

infograf768 commented Apr 14, 2019

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.

@wilsonge wilsonge merged commit f02625c into joomla:4.0-dev Apr 14, 2019
@wilsonge
Copy link
Contributor

Thanks!

@wilsonge wilsonge added this to the Joomla 4.0 milestone Apr 14, 2019
@chmst chmst deleted the chrome-well-access-rights-check branch October 8, 2019 19:01
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.

5 participants