Files
yii2/tests/framework/rbac/ActionRule.php
Misbahul D Munir 0e17d652dc Enhanced RBAC Rule assignment
* #11254 Enhanced RBAC Rule assignment

* Enhanced RBAC Rule assignment
2016-04-05 00:52:04 +03:00

17 lines
328 B
PHP

<?php
namespace yiiunit\framework\rbac;
/**
* Description of ActionRule
*/
class ActionRule extends \yii\rbac\Rule
{
public $name = 'action_rule';
public $action = 'read';
public function execute($user, $item, $params)
{
return $this->action === 'all' || $this->action === $params['action'];
}
}