Skip to content

Commit

Permalink
fix: view path error
Browse files Browse the repository at this point in the history
  • Loading branch information
krissss committed Dec 16, 2017
1 parent 9dcd228 commit cee7b37
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/auth/actions/UserRoleUpdateAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class UserRoleUpdateAction extends Action
* view name
* @var string
*/
public $view = '@kriss/modules/auth/views/user-role/_update_role';
public $view = '@krissAuth/views/user-role/_update_role';
/**
* query parameter: user ID
* @var string
Expand All @@ -40,6 +40,7 @@ class UserRoleUpdateAction extends Action

public function run()
{
Yii::setAlias('@krissAuth', dirname(__DIR__));
$id = Yii::$app->request->get($this->queryParameter);
if (!$id) {
throw new ForbiddenHttpException('need ' . $this->queryParameter . ' parameter');
Expand All @@ -65,7 +66,8 @@ public function run()
* @param $id
* @throws ForbiddenHttpException
*/
protected function checkAuth ($id) {
protected function checkAuth($id)
{
if ($this->permissionName) {
AuthValidate::run($this->permissionName);
}
Expand Down

0 comments on commit cee7b37

Please sign in to comment.