mirror of
https://github.com/yiisoft/yii2.git
synced 2026-03-04 14:34:49 +01:00
17 lines
328 B
PHP
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'];
|
|
}
|
|
}
|