wip
This commit is contained in:
@ -40,6 +40,7 @@ before_script:
|
||||
# initialize database
|
||||
- mysql -e 'CREATE DATABASE `yii2-usuario-test`;';
|
||||
- php tests/_app/yii.php migrate/up --interactive=0
|
||||
- php tests/_app/yii.php migrate/up --interactive=0 --migrationPath=@yii/rbac/migrations
|
||||
|
||||
# enable code coverage on PHP 7.1, only one PHP version needs to generate coverage data
|
||||
- |
|
||||
|
||||
@ -50,6 +50,7 @@ class Bootstrap implements BootstrapInterface
|
||||
} else {
|
||||
/* @var $app ConsoleApplication */
|
||||
$this->initConsoleCommands($app);
|
||||
$this->initAuthManager($app);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ class AdminController extends Controller
|
||||
*/
|
||||
public function beforeAction($action)
|
||||
{
|
||||
if (in_array($action->id, ['index', 'update', 'update-profile', 'info', 'assignments'])) {
|
||||
if (in_array($action->id, ['index', 'update', 'update-profile', 'info', 'assignments'], true)) {
|
||||
Url::remember('', 'actions-redirect');
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ class AdminController extends Controller
|
||||
{
|
||||
return [
|
||||
'verbs' => [
|
||||
'class' => VerbFilter::className(),
|
||||
'class' => VerbFilter::class,
|
||||
'actions' => [
|
||||
'delete' => ['post'],
|
||||
'confirm' => ['post'],
|
||||
@ -83,9 +83,9 @@ class AdminController extends Controller
|
||||
],
|
||||
],
|
||||
'access' => [
|
||||
'class' => AccessControl::className(),
|
||||
'class' => AccessControl::class,
|
||||
'ruleConfig' => [
|
||||
'class' => AccessRuleFilter::className(),
|
||||
'class' => AccessRuleFilter::class,
|
||||
],
|
||||
'rules' => [
|
||||
[
|
||||
|
||||
@ -11,10 +11,13 @@ return [
|
||||
'log' => null,
|
||||
'cache' => null,
|
||||
'db' => require __DIR__.'/db.php',
|
||||
'authManager' => [
|
||||
'class' => Da\User\Component\AuthDbManagerComponent::class,
|
||||
],
|
||||
],
|
||||
'controllerMap' => [
|
||||
'migrate' => [
|
||||
'class' => \yii\console\controllers\MigrateController::class,
|
||||
'class' => yii\console\controllers\MigrateController::class,
|
||||
'migrationPath' => null,
|
||||
'migrationNamespaces' => [
|
||||
'Da\User\Migration',
|
||||
|
||||
Reference in New Issue
Block a user