public function deletePolicy(APIPolicy $policy) { if ($this->repository->hasAccess('role', 'update') !== true) { throw new UnauthorizedException('role', 'update'); } $this->internalDeletePolicy($policy); }