Skip to content

Commit

Permalink
ImpersonateUser fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bscheshirwork authored May 24, 2017
1 parent 73e1c3b commit 8a827e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion views/admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
}
},
'switch' => function ($url, $model) {
if($model->id != Yii::$app->user->id && Yii::$app->getModule('user')->enableImpersonateUser) {
if($model->isAdmin && $model->id != Yii::$app->user->id && Yii::$app->getModule('user')->enableImpersonateUser) {
return Html::a('<span class="glyphicon glyphicon-user"></span>', ['/user/admin/switch', 'id' => $model->id], [
'title' => Yii::t('user', 'Become this user'),
'data-confirm' => Yii::t('user', 'Are you sure you want to switch to this user for the rest of this Session?'),
Expand Down

0 comments on commit 8a827e7

Please sign in to comment.