Skip to content

Commit

Permalink
Bug Fix: Don#t show all users to a non admin
Browse files Browse the repository at this point in the history
  • Loading branch information
AunePVP committed Dec 16, 2022
1 parent e034481 commit 22e26e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions users/control/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ function getusernames() {
}
</script>
<div id="dragdropform">
<?php if($username=="admin"):?>
<div class="ddparent left">
<p>Users</p>
<div id="dragform" ondrop="drop(event, this)" ondragover="allowDrop(event)">
Expand All @@ -719,6 +720,7 @@ function getusernames() {
?>
</div>
</div>
<?php endif;?>
<div class="ddparent right">
<p>Users with permission, to control this server.</p>
<div id="dropform" ondrop="drop(event, this)" ondragover="allowDrop(event)">
Expand All @@ -730,11 +732,13 @@ function getusernames() {
</div>
</div>
</div>
<?php if($username=="admin"):?>
<button id="updatecontrolperm" onclick='getusernames()'>Update</button>
<form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]) ."?id=$ServerID&page=settings"; ?>" style="display:none">
<input id="responsepermitted" name="responsepermitted">
<button id="updatepermission" type="submit" name="updatepermission"></button>
</form>
<?php endif;?>
<!-- Delete this server-->
<button type='button' id="deletebtn" onclick="confirmdelete()">Delete this server</button>
</div>
Expand Down
1 change: 1 addition & 0 deletions users/control/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ summary{
}
#dragdropform {
display: flex;
padding-bottom: 5px;
}
#dragdropform .ddparent {
width: 50%;
Expand Down

0 comments on commit 22e26e5

Please sign in to comment.