Code

Skip setting trustModel and allowedHosts if we are not allowed to change those attributes
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Jan 2007 04:05:44 +0000 (04:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 11 Jan 2007 04:05:44 +0000 (04:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5520 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/posix/class_posixAccount.inc

index e904cf61e7bf7b9dae0beadfb49899b99d4e6c9d..e3e9f2ab8ed457da4453466a61f77dc91347f513 100644 (file)
@@ -308,7 +308,7 @@ class posixAccount extends plugin
     }
 
     /* Add user workstation? */
-    if (isset($_POST["add_ws"])){
+    if (isset($_POST["add_ws"]) && chkacl($this->acl,"allowedHosts") == ""){
       $this->show_ws_dialog= TRUE;
       $this->dialog= TRUE;
     }
@@ -323,7 +323,7 @@ class posixAccount extends plugin
     }
 
     /* Remove user workstations? */
-    if (isset($_POST["delete_ws"]) && isset($_POST['workstation_list'])){
+    if (isset($_POST["delete_ws"]) && isset($_POST['workstation_list']) && chkacl($this->acl,"allowedHosts") == ""){
       foreach($_POST['workstation_list'] as $name){
         unset ($this->accessTo[$name]);
       }
@@ -666,7 +666,7 @@ class posixAccount extends plugin
       }
 
       /* Trust mode - special handling */
-      if (isset($_POST['trustmode'])){
+      if (isset($_POST['trustmode']) && chkacl($this->acl,"allowedHosts") == ""){
         $saved= $this->trustModel;
         if ($_POST['trustmode'] == "1"){
           $this->trustModel= "fullaccess";