Skip to content
New issue

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

\yii\web\User::can() and guest #12771

Closed
genichyar opened this issue Oct 18, 2016 · 3 comments
Closed

\yii\web\User::can() and guest #12771

genichyar opened this issue Oct 18, 2016 · 3 comments
Assignees
Milestone

Comments

@genichyar
Copy link
Contributor

Using \yii\web\User::can() for guest always returns false for all my cases. But it checks permissions and executes all relative bizrules.

Why does \yii\web\User::can() not return false for guest default without any checks?

@genichyar
Copy link
Contributor Author

Problem can be viewed at another point.

Why does \yii\rbac\PhpManager::checkAccess() execute \yii\rbac\PhpManager::checkAccessRecursive even if assignments and defaultRoles are empty?

@samdark samdark added this to the 2.0.11 milestone Oct 18, 2016
@samdark
Copy link
Member

samdark commented Oct 18, 2016

I guess it could be improved. Need to review code though.

pchapl pushed a commit to pchapl/yii2 that referenced this issue Oct 19, 2016
Skip \yii\rbac\PhpManager::checkAccessRecursive and \yii\rbac\DbManager::checkAccessRecursive if role assignments are empty
pchapl pushed a commit to pchapl/yii2 that referenced this issue Oct 19, 2016
Skip \yii\rbac\PhpManager::checkAccessRecursive and \yii\rbac\DbManager::checkAccessRecursive if role assignments are empty
pchapl pushed a commit to pchapl/yii2 that referenced this issue Oct 20, 2016
Skip \yii\rbac\PhpManager::checkAccessRecursive and \yii\rbac\DbManager::checkAccessRecursive if role assignments are empty
pchapl pushed a commit to pchapl/yii2 that referenced this issue Oct 20, 2016
Skip \yii\rbac\PhpManager::checkAccessRecursive and \yii\rbac\DbManager::checkAccessRecursive if role assignments are empty
pchapl pushed a commit to pchapl/yii2 that referenced this issue Nov 15, 2016
Skip \yii\rbac\PhpManager::checkAccessRecursive and \yii\rbac\DbManager::checkAccessRecursive if role assignments are empty
@SilverFire
Copy link
Member

Resolved by 5795b39

@SilverFire SilverFire self-assigned this Dec 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants