Skip to content

Commit 8a827e7

Browse files
ImpersonateUser fix
dektrium#893
1 parent 73e1c3b commit 8a827e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

views/admin/index.php

Lines changed: 1 addition & 1 deletion
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)