Skip to content
Snippets Groups Projects
Commit d38bf0b5 authored by Yohan Salamone's avatar Yohan Salamone Committed by Martin Anderson-Clutz
Browse files

Issue #3447073 by ysalamone: Per-bundle view permissions are not checked for unpublished entities

parent 6328d1a8
No related branches found
No related tags found
1 merge request!14Issue #3447073 by yohansenso: Per-bundle view permissions are not checked for unpublished entities
...@@ -37,7 +37,14 @@ class StorageAccessControlHandler extends EntityAccessControlHandler { ...@@ -37,7 +37,14 @@ class StorageAccessControlHandler extends EntityAccessControlHandler {
->addCacheableDependency($entity); ->addCacheableDependency($entity);
} }
return AccessResult::allowedIfHasPermission($account, 'view unpublished storage entities') return AccessResult::allowedIfHasPermissions(
$account,
[
'view unpublished storage entities',
'view unpublished ' . $entity->bundle() . ' storage entities',
],
'OR'
)
->cachePerPermissions() ->cachePerPermissions()
->addCacheableDependency($entity); ->addCacheableDependency($entity);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment