methodName) { // need at least "read only rights". $this->acceptedRoles[] = UserRoleEnum::READ_ONLY; } if ('GET' !== $this->methodName) { // either post, put or delete or something else.. you need more access rights. switch ($this->className) { default: throw new AuthorizationException(sprintf('Cannot handle class "%s"', $this->className)); case Account::class: $this->acceptedRoles[] = UserRoleEnum::MANAGE_TRANSACTIONS; break; } } $this->validateUserGroup(); } private function validateUserGroup(): void { try { throw new FireflyException('Here we are'); } catch (FireflyException $e) { Log::error($e->getTraceAsString()); } exit('here we are'); } }