public function actionIndex()
 {
     $users = Users::getUsers();
     $roles = Rbac::getRoles();
     $assigned = Rbac::getAssigned();
     $permissions = Rbac::getPermissions();
     return $this->render('index', ['users' => $users, 'roles' => $roles, 'assigned' => $assigned, 'permissions' => $permissions]);
 }
Example #2
0
echo Yii::t('app', 'Role');
?>
</th>
			        <th><?php 
echo Yii::t('app', 'Actions');
?>
</th>
			      </tr>
			    </thead>
			    <tbody>
			    <?php 
foreach ($assigned as $each) {
    ?>
			      <tr>
			        <td><?php 
    echo Users::getUsernameByID($each->user_id);
    ?>
</td>
			        <td><?php 
    echo $each->item_name;
    ?>
</td>
			        <td>
			        	<?php 
    echo Html::beginForm(['rbac/deleterole'], 'post', ['enctype' => 'multipart/form-data']);
    ?>
							<?php 
    echo Html::hiddenInput('user_id', $value = $each->user_id);
    ?>
							<?php 
    echo Html::hiddenInput('role', $value = $each->item_name);