We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Orignal Yii has AccessControl that use in Controller behavior.
It's simple for us to control page permission.
I think yii-permission should be able to implement.
usage example in controller:
public function behaviors() { return [ 'permission' => PermissionControl::class 'rules' => [ 'allow' => true, 'actions' => ['index', 'view'], 'enforce' => [ 'user' => \Yii::$app->user->identity->id, // map to $v0 'obj' => 'data1', // map to $v1 'dom' => 'domain1', // map to $v2 ? 'act' => 'read', // map to $v3 ? ], ], ]; }
It will check current user can read domain1's data1 , then allow actions index and view. $v0~$v5 can be alias in config for readable.
I don’t know if anyone can experiment with my wish 😍
The text was updated successfully, but these errors were encountered:
This issue can be closed now.😀 @leeqvip
Sorry, something went wrong.
No branches or pull requests
Orignal Yii has AccessControl that use in Controller behavior.
It's simple for us to control page permission.
I think yii-permission should be able to implement.
usage example in controller:
It will check current user can read domain1's data1 , then allow actions index and view.
$v0~$v5 can be alias in config for readable.
I don’t know if anyone can experiment with my wish 😍
The text was updated successfully, but these errors were encountered: