Code

Updated ACL handling for groups.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 15 Jul 2008 13:10:25 +0000 (13:10 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 15 Jul 2008 13:10:25 +0000 (13:10 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11664 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/groups/class_groupGeneric.inc
gosa-core/plugins/admin/groups/generic.tpl

index 10c23d1df4e4f50b8bf78f7d7ad191207d93fbda..79de277e414234ce7371f5556f97d3c9d67c675d 100644 (file)
@@ -238,7 +238,7 @@ class group extends plugin
     }
 
     /* Delete user from group */
-    if (isset($_POST['del_users']) && isset($_POST['members'])){
+    if (isset($_POST['del_users']) && isset($_POST['members']) && preg_match("/w/",$this->getacl("memberUid"))){
       foreach ($_POST['members'] as $value){
         unset ($this->members["$value"]);
         $this->removeUser($value);
@@ -247,7 +247,7 @@ class group extends plugin
     }
 
     /* Add objects? */
-    if (isset($_POST["edit_membership"])){
+    if (isset($_POST["edit_membership"]) && preg_match("/w/",$this->getacl("memberUid"))){
       $this->group_dialog= TRUE;
       $this->dialog= TRUE;
     }
@@ -815,14 +815,14 @@ class group extends plugin
       }
 
       /* Save fon attribute */
-      if ($this->acl_is_writeable("fon_group")){
+      if ($this->acl_is_writeable("fonGroup")){
         if (isset ($_POST['fon_group'])){
           $this->fon_group= TRUE;
         } else {
           $this->fon_group= FALSE;
         }
       }
-      if ($this->acl_is_writeable("nagios_group")){
+      if ($this->acl_is_writeable("nagiosGroup")){
         if (isset ($_POST['nagios_group'])){
           $this->nagios_group= TRUE;
         } else {
@@ -1230,17 +1230,18 @@ class group extends plugin
 
           "plProvidedAcls"    => array(
             "cn"                => _("Name"),
-            "base"              => _("Base"),
             "description"       => _("Description"),
-
-            "fonGroup"          => _("Phone pickup group"),
-            "nagiosGroup"       => _("Nagios group"),
+            "base"              => _("Base"),
 
             "gidNumber"         => _("GID"),
-            "memberUid"         => _("Group member"),
+
             "sambaGroupType"    => _("Samba group type"),
             "sambaDomainName"   => _("Samba domain name"),
-            "sambaSID"          => _("Samba SID"))
+            "trustModel"        => _("System trust"),
+            "fonGroup"          => _("Phone pickup group"),
+            "nagiosGroup"       => _("Nagios group"),
+
+            "memberUid"         => _("Group member"))
         ));
   }
 
@@ -1288,7 +1289,7 @@ class group extends plugin
       }
 
       /* Save fon attribute */
-      if ($this->acl_is_writeable("fon_group")){
+      if ($this->acl_is_writeable("fonGroup")){
         if (isset ($_POST['fon_group'])){
           $this->fon_group= TRUE;
         } else {
index aa6b61a2fdde3a2b1d05d1bfc5ea8c40bd45ea38..726d1e12ddf7a3e5601fbdffa8973db20063f7ec 100644 (file)
        {/if}
 {/render}
       <br>
+{render acl=$memberUidACL}
       <input type=submit name="edit_membership" value="{msgPool type=addButton}">
+{/render}
       &nbsp;
+{render acl=$memberUidACL}
       <input type=submit name="del_users" value="{msgPool type=delButton}">
+{/render}
      </td>
     </tr> 
    </table>