Skip to content

Commit

Permalink
added EasyAccessControl
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Apr 30, 2018
1 parent abead4b commit ccdb450
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/controllers/DbController.php
Expand Up @@ -18,11 +18,27 @@
use hipanel\actions\ValidateFormAction;
use hipanel\actions\ViewAction;
use hipanel\base\CrudController;
use hipanel\filters\EasyAccessControl;
use Yii;
use yii\base\Event;

class DbController extends CrudController
{
public function behaviors()
{
return array_merge(parent::behaviors(), [
[
'class' => EasyAccessControl::class,
'actions' => [
'create' => 'account.create',
'delete,truncate' => 'account.delete',
'set-password,set-description' => 'account.update',
'*' => 'account.read',
],
],
]);
}

public function actions()
{
return array_merge(parent::actions(), [
Expand Down

0 comments on commit ccdb450

Please sign in to comment.