From d29660bbb340aabb237c6f59a97b746f6de85292 Mon Sep 17 00:00:00 2001 From: mdmunir Date: Thu, 14 Apr 2016 08:21:32 +0700 Subject: [PATCH] Allow directly attach rule using rule class name --- models/AuthItem.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/AuthItem.php b/models/AuthItem.php index b10643cf..a8e0bdb3 100644 --- a/models/AuthItem.php +++ b/models/AuthItem.php @@ -99,10 +99,10 @@ public function checkRule() $rule->name = $name; Yii::$app->getAuthManager()->add($rule); } else { - $this->addError('ruleName', Yii::t('rbac-admin', 'Invalid rule {value}', ['value' => $name])); + $this->addError('ruleName', Yii::t('rbac-admin', 'Invalid rule "{value}"', ['value' => $name])); } } catch (\Exception $exc) { - $this->addError('ruleName', Yii::t('rbac-admin', 'Rule {value} does not exists', ['value' => $name])); + $this->addError('ruleName', Yii::t('rbac-admin', 'Rule "{value}" does not exists', ['value' => $name])); } } }