<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
// 'id',
'username',
//'auth_key',
//'password_hash',
// 'pas//sword_reset_token',
// 'email:email',
// 'status',
// 'created_at',
// 'updated_at',
['class' => 'yii\grid\ActionColumn', 'template' => '{delete}'],
],
]); ?>
[
'class' => ActionColumn::className(),
'visibleButtons' => [
'delete' => (Yii::$app->user->identity->username == 'admin')?true:false,
],
],