Skip to content

Commit 751e7ab

Browse files
bscheshirworkthiagotalma
authored andcommitted
ImpersonateUser fix (#893)
Fix #890
1 parent 62246be commit 751e7ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

views/admin/index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125
}
126126
},
127127
'switch' => function ($url, $model) {
128-
if($model->id != Yii::$app->user->id && Yii::$app->getModule('user')->enableImpersonateUser) {
128+
if($model->isAdmin && $model->id != Yii::$app->user->id && Yii::$app->getModule('user')->enableImpersonateUser) {
129129
return Html::a('<span class="glyphicon glyphicon-user"></span>', ['/user/admin/switch', 'id' => $model->id], [
130130
'title' => Yii::t('user', 'Become this user'),
131131
'data-confirm' => Yii::t('user', 'Are you sure you want to switch to this user for the rest of this Session?'),

0 commit comments

Comments
 (0)