Skip to content
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

SearchKit - Fix menu permission #20349

Merged
merged 1 commit into from
May 20, 2021

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented May 19, 2021

Overview

Adjust permission in menubar to match permission on page so that non-permissioned users do not see a non-functional link in the menu.

See https://lab.civicrm.org/dev/core/-/issues/2619

Before

Non-admin users see SearchKit menu but when they click on it get "Access Denied"

After

Only admin users see SearchKit in menubar.

Technical Details

Uses the fairly new 'administer CiviCRM data' permission, which is a sub-permission of 'administer CiviCRM'.

@civibot
Copy link

civibot bot commented May 19, 2021

(Standard links)

@civibot civibot bot added the master label May 19, 2021
@colemanw colemanw force-pushed the searchKitFixMenuPerm branch from 72a506a to 1e74412 Compare May 19, 2021 20:09
@@ -18,6 +18,7 @@ public function enable() {
->addValue('icon', 'crm-i fa-search-plus')
->addValue('has_separator', 2)
->addValue('weight', 99)
->addValue('permission', 'administer CiviCRM')
Copy link
Contributor

Choose a reason for hiding this comment

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

@totten @colemanw is 'administer CiviCRM data' (sub permission) better here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fine with me.

@colemanw colemanw force-pushed the searchKitFixMenuPerm branch from 1e74412 to 919be70 Compare May 20, 2021 12:14
@eileenmcnaughton eileenmcnaughton merged commit 6ad6d19 into civicrm:master May 20, 2021
@eileenmcnaughton eileenmcnaughton deleted the searchKitFixMenuPerm branch May 20, 2021 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants