diff --git a/web/index.php b/web/index.php index 479ab17..c63472b 100644 --- a/web/index.php +++ b/web/index.php @@ -353,10 +353,15 @@ if (isset($_SESSION['username'])){ } if(($mode!="newvm")&&($mode!="editvm")&&($mode!='usermgmt')){ - echo "Create a new VM"; + if ($_SESSION['isadmin']=="1"){ + $sqllimit=""; + echo "Create a new VM"; + } else { + $sqllimit="WHERE user='$_SESSION[username]'"; + } //getting vms from DB - $sql="SELECT * FROM vms"; + $sql="SELECT * FROM vms $sqllimit"; $res = $db_handle->query($sql); echo "