mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
role is now an instance of SeedDMD_Core_Role
This commit is contained in:
parent
ee7180ccd3
commit
49be0485c5
|
@ -40,6 +40,11 @@ if (is_bool($groups)) {
|
|||
UI::exitError(getMLText("admin_tools"),getMLText("internal_error"));
|
||||
}
|
||||
|
||||
$roles = $dms->getAllRoles();
|
||||
if (is_bool($roles)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("internal_error"));
|
||||
}
|
||||
|
||||
if(isset($_GET['userid']) && $_GET['userid']) {
|
||||
$seluser = $dms->getUser($_GET['userid']);
|
||||
} else {
|
||||
|
@ -47,7 +52,7 @@ if(isset($_GET['userid']) && $_GET['userid']) {
|
|||
}
|
||||
|
||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'seluser'=>$seluser, 'allusers'=>$users, 'allgroups'=>$groups, 'passwordstrength'=>$settings->_passwordStrength, 'passwordexpiration'=>$settings->_passwordExpiration, 'httproot'=>$settings->_httpRoot, 'enableuserimage'=>$settings->_enableUserImage, 'undeluserids'=>explode(',', $settings->_undelUserIds), 'workflowmode'=>$settings->_workflowMode, 'quota'=>$settings->_quota, 'strictformcheck'=>$settings->_strictFormCheck));
|
||||
$view = UI::factory($theme, $tmp[1], array('dms'=>$dms, 'user'=>$user, 'seluser'=>$seluser, 'allusers'=>$users, 'allgroups'=>$groups, 'allroles'=>$roles, 'passwordstrength'=>$settings->_passwordStrength, 'passwordexpiration'=>$settings->_passwordExpiration, 'httproot'=>$settings->_httpRoot, 'enableuserimage'=>$settings->_enableUserImage, 'undeluserids'=>explode(',', $settings->_undelUserIds), 'workflowmode'=>$settings->_workflowMode, 'quota'=>$settings->_quota, 'strictformcheck'=>$settings->_strictFormCheck));
|
||||
if($view) {
|
||||
$view($_GET);
|
||||
}
|
||||
|
|
|
@ -157,6 +157,7 @@ $(document).ready( function() {
|
|||
$user = $this->params['user'];
|
||||
$users = $this->params['allusers'];
|
||||
$groups = $this->params['allgroups'];
|
||||
$roles = $this->params['allroles'];
|
||||
$passwordstrength = $this->params['passwordstrength'];
|
||||
$passwordexpiration = $this->params['passwordexpiration'];
|
||||
$httproot = $this->params['httproot'];
|
||||
|
@ -240,7 +241,13 @@ $(document).ready( function() {
|
|||
</tr>
|
||||
<tr>
|
||||
<td><?php printMLText("role");?>:</td>
|
||||
<td><select name="role"><option value="<?php echo SeedDMS_Core_User::role_user ?>"><?php printMLText("role_user"); ?></option><option value="<?php echo SeedDMS_Core_User::role_admin ?>" <?php if($currUser && $currUser->getRole() == SeedDMS_Core_User::role_admin) echo "selected"; ?>><?php printMLText("role_admin"); ?></option><option value="<?php echo SeedDMS_Core_User::role_guest ?>" <?php if($currUser && $currUser->getRole() == SeedDMS_Core_User::role_guest) echo "selected"; ?>><?php printMLText("role_guest"); ?></option></select></td>
|
||||
<td><select name="role">
|
||||
<?php
|
||||
foreach($roles as $role) {
|
||||
echo '<option value="'.$role->getID().'"'.($currUser && $currUser->getRole()->getID() == $role->getID() ? ' selected' : '').'>'.$role->getName().'</option>';
|
||||
}
|
||||
?>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php printMLText("groups");?>:</td>
|
||||
|
|
Loading…
Reference in New Issue
Block a user