public function startup() { parent::startup(); if ($this->user->isAllowed('Users', 'edit')) { $this->redirect('Dashboard:default'); } }
public function startup() { parent::startup(); if (!$this->user->isAllowed('Article', 'view')) { throw new ForbiddenRequestException('Access denied'); $this->redirect('Dashboard:default'); } }