Skip to content

Commit

Permalink
Added check to initialize
Browse files Browse the repository at this point in the history
  • Loading branch information
githubjeka committed Jun 20, 2015
1 parent 14e0b83 commit 83b02d5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Module.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
namespace githubjeka\rbac;

use yii\base\InvalidConfigException;

/**
* Graphical user module for Role Based Access Control Yii2 Module.
* It also allows to perform basic operations RBAC.
Expand Down Expand Up @@ -30,6 +32,9 @@ class Module extends \yii\base\Module
*/
public function init()
{
if (\Yii::$app->authManager === null) {
throw new InvalidConfigException('You should configure authManager component');
}
parent::init();
}
}

0 comments on commit 83b02d5

Please sign in to comment.