Skip to content

Commit 22e26e5

Browse files
committed
Bug Fix: Don#t show all users to a non admin
1 parent e034481 commit 22e26e5

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

users/control/server.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,7 @@ function getusernames() {
707707
}
708708
</script>
709709
<div id="dragdropform">
710+
<?php if($username=="admin"):?>
710711
<div class="ddparent left">
711712
<p>Users</p>
712713
<div id="dragform" ondrop="drop(event, this)" ondragover="allowDrop(event)">
@@ -719,6 +720,7 @@ function getusernames() {
719720
?>
720721
</div>
721722
</div>
723+
<?php endif;?>
722724
<div class="ddparent right">
723725
<p>Users with permission, to control this server.</p>
724726
<div id="dropform" ondrop="drop(event, this)" ondragover="allowDrop(event)">
@@ -730,11 +732,13 @@ function getusernames() {
730732
</div>
731733
</div>
732734
</div>
735+
<?php if($username=="admin"):?>
733736
<button id="updatecontrolperm" onclick='getusernames()'>Update</button>
734737
<form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]) ."?id=$ServerID&page=settings"; ?>" style="display:none">
735738
<input id="responsepermitted" name="responsepermitted">
736739
<button id="updatepermission" type="submit" name="updatepermission"></button>
737740
</form>
741+
<?php endif;?>
738742
<!-- Delete this server-->
739743
<button type='button' id="deletebtn" onclick="confirmdelete()">Delete this server</button>
740744
</div>

users/control/style.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ summary{
533533
}
534534
#dragdropform {
535535
display: flex;
536+
padding-bottom: 5px;
536537
}
537538
#dragdropform .ddparent {
538539
width: 50%;

0 commit comments

Comments
 (0)