protected function checkPermission($type)
    {
        if (isset($this->config[$type]['visible'])) {
            $role = $this->config[$type]['visible'];
            unset($this->config[$type]['visible']);
            if (!Yii::$app->getUser()->can($role)) {
                return false;
            }
        }

        return true;
    }