What steps will reproduce the problem?
Have user panel set up with roles filter because we only want to allow admin users to have this functionality
'user' => [
'class' => \yii\debug\panels\UserPanel::class,
'ruleUserSwitch' => [
'allow' => true,
'roles' => ['root'],
],
],
What's expected?
User switching works fine. But when I switch to another user that does not have root role I have a possibility to switch back to my own user.
What do you get instead?
I'm stuck with the user i switched to.
Additional info
There should always be possibility to go back to your own original user regardless of access controls you set for the functionality.
| Q |
A |
| Yii version |
2.0.49 |
| PHP version |
8.2.11 |
| Operating system |
Debian |
What steps will reproduce the problem?
Have user panel set up with roles filter because we only want to allow admin users to have this functionality
What's expected?
User switching works fine. But when I switch to another user that does not have
rootrole I have a possibility to switch back to my own user.What do you get instead?
I'm stuck with the user i switched to.
Additional info
There should always be possibility to go back to your own original user regardless of access controls you set for the functionality.