Skip to content

Commit

Permalink
Merge pull request #173 from LM-Commons/4.1.x-merge-up-into-4.2.x_OLR…
Browse files Browse the repository at this point in the history
…KpSeb

Merge release 4.1.1 into 4.2.x
  • Loading branch information
visto9259 authored Jan 27, 2025
2 parents 2b08a49 + 75ba360 commit 16ca46b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 25 deletions.
54 changes: 29 additions & 25 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions src/View/Strategy/UnauthorizedStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

namespace Lmc\Rbac\Mvc\View\Strategy;

use Laminas\EventManager\EventManagerInterface;
use Laminas\Http\Response as HttpResponse;
use Laminas\Mvc\MvcEvent;
use Laminas\View\Model\ViewModel;
Expand All @@ -43,6 +44,15 @@ public function __construct(UnauthorizedStrategyOptions $options)
$this->options = $options;
}

/**
* @inheritDoc
*/
public function attach(EventManagerInterface $events, $priority = 1): void
{
// Temporary fix to priority to make sure listeners runs after MVC's exception handler
$this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, [$this, 'onError'], -1);
}

/**
* @private
*/
Expand Down

0 comments on commit 16ca46b

Please sign in to comment.