Skip to content

Commit

Permalink
Merge branch 'release-54.26.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Dec 4, 2024
2 parents d31fec0 + 2a2f9d8 commit 715a25d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions models/classes/routing/ActionEnforcer.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,14 @@ protected function verifyAuthorization()
$func->hasAccess($user, $this->getControllerClass(), $this->getAction(), $this->getParameters()) &&
!$data->hasAccess($user, $this->getControllerClass(), $this->getAction(), $this->getParameters())
) {
throw new PermissionException(
$user->getIdentifier(),
$this->getAction(),
$this->getControllerClass(),
$this->getExtensionId()
);
if ($user->getIdentifier()) {
throw new PermissionException(
$user->getIdentifier(),
$this->getAction(),
$this->getControllerClass(),
$this->getExtensionId()
);
}
}

throw new tao_models_classes_AccessDeniedException(
Expand Down Expand Up @@ -198,6 +200,7 @@ public function execute()
} catch (PermissionException $pe) {
// forward the action (yes it's an awful hack, but far better than adding a step in Bootstrap's dispatch
// error).

Context::getInstance()->setExtensionName('tao');
$this->action = 'denied';
$this->controllerClass = 'tao_actions_Permission';
Expand Down

0 comments on commit 715a25d

Please sign in to comment.