Skip to content
This repository has been archived by the owner on Jan 27, 2020. It is now read-only.

Admin menu permission problem #4

Open
signoredellarete opened this issue Nov 25, 2018 · 0 comments
Open

Admin menu permission problem #4

signoredellarete opened this issue Nov 25, 2018 · 0 comments

Comments

@signoredellarete
Copy link

I think it could be useful hide things that role cannot use, adding an 'access' parameter in the definition of menu. If a role cannot access the any permission of an extension, neither shoud see the related menu item.

I found this problem in sqpr/assets

Solved it adding a row in main index.php:

/pagekit/packages/spqr/assets/index.php

...
'menu'        => [
'assets'           => [
'label'  => 'Assets',
'url'    => '@assets/asset',
'active' => '@assets/asset*',
'icon'   => 'spqr/assets:icon.svg',
'access' => 'assets: manage assets || assets: manage settings' /* Add this row */
],
...
@signoredellarete signoredellarete changed the title spqr/assets admin menu permission problem Admin menu permission problem Nov 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant