Skip to content

Commit a90e013

Browse files
committed
Allow components list to show if CMS permissions are limited
The permission check for displaying the components list was checking the user had the "cms.manage_pages", "cms.manage_layouts" AND "cms.manage_partials" permissions, and if the user was lacking one of them, it would not show. Since all types of templates allow partials, this should be a "at least one" check so a user who is limited to certain types of templates may still add components.
1 parent 64602ba commit a90e013

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/cms/controllers/index/_sidepanel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class="layout <?= ++$visibleCount == 1 ? '' : 'hide' ?>"
6464
<?= $this->widget->assetList->render() ?>
6565
</form>
6666
<?php endif ?>
67-
<?php if ($this->user->hasAccess(['cms.manage_pages', 'cms.manage_layouts', 'cms.manage_partials'])): ?>
67+
<?php if ($this->user->hasAccess(['cms.manage_pages', 'cms.manage_layouts', 'cms.manage_partials'], false)): ?>
6868
<!-- Components -->
6969
<form
7070
role="form"

0 commit comments

Comments
 (0)