protected function loadQueue($name, $authItems = [])
    {
        /** @var User */
        $user = Yii::$app->user;
        /** @var Queue */
        $queue = Yii::$app->get($name);
        if (!($queue instanceof components\QueueInterface)) {
            throw new NotFoundHttpException(Yii::t("app", 'Queue with given ID was not found.'));
        }
        $assignedAuthItems = [];
        $allowAccess = empty($authItems);
        foreach ($authItems as $authItem) {
            $assignedAuthItems[$authItem] = $user->can($authItem, ['queue' => $queue]);
            if ($assignedAuthItems[$authItem]) {
                $allowAccess = true;
            }
        }
        if (!$allowAccess) {
            throw new ForbiddenHttpException(Yii::t('yii', 'You are not authorized to perform this action.'));
        }

        return [$queue, $assignedAuthItems];
    }