Code

Updated phone create acls
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 May 2008 09:37:38 +0000 (09:37 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 May 2008 09:37:38 +0000 (09:37 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11068 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/gofon/admin/systems/gofon/class_phoneGeneric.inc
gosa-plugins/gofon/admin/systems/gofon/paste_generic.tpl [new file with mode: 0644]

index 6508cac919f3cd65c7ef9193290540a00c4068ae..1fd72753b9ec3df2e227b6c4a9566e6564132951 100644 (file)
@@ -11,6 +11,8 @@ class phoneGeneric extends plugin
   var $cn               = "";
   var $description      = "";
   var $orig_dn          = "";
+  var $orig_cn          = "";
+  var $orig_base        = "";
   var $goFonType        = "";
   var $goFonDmtfMode    = "";
   var $goFonHost        = "";
@@ -88,6 +90,8 @@ class phoneGeneric extends plugin
 
     /* Save dn for later references */
     $this->orig_dn= $this->dn;
+    $this->orig_base= $this->base;
+    $this->orig_cn= $this->cn;
   }
 
   function set_acl_base($base)
@@ -361,6 +365,14 @@ class phoneGeneric extends plugin
       }
     }
 
+    /* Check if we are allowed to create or move this object
+     */
+    if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){
+      $message[] = msgPool::permCreate();
+    }elseif($this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
+      $message[] = msgPool::permMove();
+    }
+
     return ($message);
   }
 
diff --git a/gosa-plugins/gofon/admin/systems/gofon/paste_generic.tpl b/gosa-plugins/gofon/admin/systems/gofon/paste_generic.tpl
new file mode 100644 (file)
index 0000000..ebaf6c1
--- /dev/null
@@ -0,0 +1,8 @@
+    <table summary="">
+     <tr>
+      <td><LABEL for="cn">{t}Phone name{/t}</LABEL>{$must}</td>
+      <td>
+       <input name="cn" id="cn" size=20 maxlength=60 value="{$cn}">
+      </td>
+     </tr>
+       </table>