public function unique()
{
$authManager = Configs::authManager();
$value = $this->name;
if ($authManager->getRole($value) !== null || $authManager->getPermission($value) !== null) {
$message = Yii::t('yii', '{attribute} "{value}" has already been taken.');
$params = ['attribute' => $this->getAttributeLabel('name'), 'value' => $value];
$this->addError('name', Yii::$app->getI18n()->format($message, $params, Yii::$app->language));
}
}