show role of users in user list

This commit is contained in:
Uwe Steinmann 2017-05-02 17:17:52 +02:00
parent 0b2d663c56
commit 2c19bb0e6f
3 changed files with 29 additions and 2 deletions

View File

@ -4,6 +4,7 @@
- fix authentication in webdav.php (Closes #250) - fix authentication in webdav.php (Closes #250)
- update last access time only once a minute - update last access time only once a minute
- run action 'css' in view if it exists, move css code for timeline - run action 'css' in view if it exists, move css code for timeline
- show role of users in user list and substitute user list
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
Changes in version 4.3.34 Changes in version 4.3.34

View File

@ -49,7 +49,7 @@ class SeedDMS_View_SubstituteUser extends SeedDMS_Bootstrap_Style {
?> ?>
<table class="table table-condensed"> <table class="table table-condensed">
<thead> <thead>
<tr><th><?php printMLText('name'); ?></th><th><?php printMLText('email');?></th><th><?php printMLText('groups'); ?></th><th></th></tr> <tr><th><?php printMLText('name'); ?></th><th><?php printMLText('email');?></th><th><?php printMLText('groups'); ?></th><th><?php printMLText('role'); ?></th><th></th></tr>
</thead> </thead>
<tbody> <tbody>
<?php <?php
@ -73,6 +73,19 @@ class SeedDMS_View_SubstituteUser extends SeedDMS_Bootstrap_Style {
} }
echo "</td>"; echo "</td>";
echo "<td>"; echo "<td>";
switch($currUser->getRole()) {
case SeedDMS_Core_User::role_user:
printMLText("role_user");
break;
case SeedDMS_Core_User::role_admin:
printMLText("role_admin");
break;
case SeedDMS_Core_User::role_guest:
printMLText("role_guest");
break;
}
echo "</td>";
echo "<td>";
if($currUser->getID() != $user->getID()) { if($currUser->getID() != $user->getID()) {
echo "<a class=\"btn\" href=\"../op/op.SubstituteUser.php?userid=".((int) $currUser->getID())."\"><i class=\"icon-exchange\"></i> ".getMLText('substitute_user')."</a> "; echo "<a class=\"btn\" href=\"../op/op.SubstituteUser.php?userid=".((int) $currUser->getID())."\"><i class=\"icon-exchange\"></i> ".getMLText('substitute_user')."</a> ";
} }

View File

@ -50,7 +50,7 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style {
?> ?>
<table class="table table-condensed"> <table class="table table-condensed">
<thead><tr><th></th><th><?php printMLText('name'); ?></th><th><?php printMLText('groups'); ?></th><th><?php printMLText('discspace'); ?></th><th><?php printMLText('authentication'); ?></th><th></th></tr></thead><tbody> <thead><tr><th></th><th><?php printMLText('name'); ?></th><th><?php printMLText('groups'); ?></th><th><?php printMLText('role'); ?></th><th><?php printMLText('discspace'); ?></th><th><?php printMLText('authentication'); ?></th><th></th></tr></thead><tbody>
<?php <?php
foreach ($allUsers as $currUser) { foreach ($allUsers as $currUser) {
echo "<tr>"; echo "<tr>";
@ -74,6 +74,19 @@ class SeedDMS_View_UserList extends SeedDMS_Bootstrap_Style {
} }
echo "</td>"; echo "</td>";
echo "<td>"; echo "<td>";
switch($currUser->getRole()) {
case SeedDMS_Core_User::role_user:
printMLText("role_user");
break;
case SeedDMS_Core_User::role_admin:
printMLText("role_admin");
break;
case SeedDMS_Core_User::role_guest:
printMLText("role_guest");
break;
}
echo "</td>";
echo "<td>";
echo SeedDMS_Core_File::format_filesize($currUser->getUsedDiskSpace()); echo SeedDMS_Core_File::format_filesize($currUser->getUsedDiskSpace());
if($quota) { if($quota) {
echo " / "; echo " / ";