Skip to content

Commit e19d251

Browse files
committed
make possible to deny all operations
Signed-off-by: Robert Landers <landers.robert@gmail.com>
1 parent 98717b2 commit e19d251

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/State/AbstractHistory.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ protected function checkAccessControl(?Provenance $user, StateId $from, Reflecti
154154

155155
foreach ($controls as $accessControl) {
156156
if ($accessControl instanceof DenyAnyOperation) {
157+
if ($accessControl->fromType === null && $accessControl->fromId === null && $accessControl->fromRole === null && $accessControl->fromUser === null) {
158+
return false;
159+
}
160+
157161
if ($accessControl->fromUser && $user->userId === $accessControl->fromUser) {
158162
return false;
159163
}

0 commit comments

Comments
 (0)