do not show substitute user button if not admin or same user

This commit is contained in:
Uwe Steinmann 2016-02-15 15:22:41 +01:00
parent 0005d9ffaf
commit e9f185533c

View File

@ -80,6 +80,7 @@ $(document).ready( function() {
function info() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$seluser = $this->params['seluser'];
$quota = $this->params['quota'];
$workflowmode = $this->params['workflowmode'];
@ -134,7 +135,8 @@ $(document).ready( function() {
}
echo "</table>";
echo "<a href=\"../op/op.SubstituteUser.php?userid=".$seluser->getID()."\" class=\"btn btn-primary\">".getMLText("substitute_user")."</a>\n";
if($user->isAdmin() && $seluser->getID() != $user->getID())
echo "<a href=\"../op/op.SubstituteUser.php?userid=".$seluser->getID()."\" class=\"btn btn-primary\">".getMLText("substitute_user")."</a>\n";
}
} /* }}} */