Code

Updated ogroup acls
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Dec 2005 12:50:54 +0000 (12:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 2 Dec 2005 12:50:54 +0000 (12:50 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2207 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/acl_definition.inc
plugins/admin/ogroups/class_ogroup.inc
plugins/admin/ogroups/class_ogroupManagement.inc
plugins/admin/ogroups/generic.tpl

index 69d4c16c8ebdf874f08df4a5849a09e9f8a2a3b4..02c8004ae34a2bbaa62a40d754f4769e56277ac5 100644 (file)
@@ -43,6 +43,7 @@ $ACLD['group']=      array("cn",
                        "force_gid",
                        "password",
                        "gidNumber");
+$ACLD['ogroup']=   array("ogroup","create","delete","cn", "description", "gosaGroupObjects","base");
 $ACLD['appgroup']=   array();
 $ACLD['all']=        array();
 $ACLD['mailgroup']=  array("default_permission",
index b69b284ae968272e756dddf4a371c8f5d03be2c9..a88fd660a06c2e67f182f22ba12f78e2bec2daa3 100644 (file)
@@ -83,6 +83,12 @@ class ogroup extends plugin
      $this->base = $_SESSION['ogroupfilter']['depselect'];
     }
 
+     /* set permissions */
+    $ui= get_userinfo();
+    $acl= get_permissions ($ui->dn, $ui->subtreeACL);
+    $this->acl= get_module_permission($acl, "ogroup", $ui->dn);
+
+
     /* Load member data */
     $this->reload();
   }
@@ -118,6 +124,7 @@ class ogroup extends plugin
        /* Call parent execute */
        plugin::execute();
 
+    print $this->acl;
     
     $this->reload();
 
index 1f33b87d3eab3af9f3a09e2fd78f1994d5a8fdcf..09210ac1e3f2b33e72f04c1ec258137feb340a07 100644 (file)
@@ -192,8 +192,7 @@ class ogroupManagement extends plugin
 
       /* Create new usertab object */
       $this->ogroup= new ogrouptabs($this->config,
-          $this->config->data['TABS']['OGROUPTABS'], $this->dn);
-      $this->ogroup->set_acl(array(':all'));
+      $this->config->data['TABS']['OGROUPTABS'], $this->dn);
     }
 
     if ($s_action=="del"){
@@ -234,7 +233,7 @@ class ogroupManagement extends plugin
 
         /* Delete request is permitted, perform LDAP action */
         $this->ogroup= new ogrouptabs($this->config,
-            $this->config->data['TABS']['OGROUPTABS'], $this->dn);
+        $this->config->data['TABS']['OGROUPTABS'], $this->dn);
         $this->ogroup->set_acl(array($this->acl));
         $this->ogroup->delete ();
         gosa_log ("Object group'".$this->dn."' has been removed");
index 6a8a7b3a8fb3cd9cc0b023b84b08918379609ac5..0cbbd2fba55ba3a59769490a47892b99400a6cf2 100644 (file)
   <td style="border-left:1px solid #A0A0A0; padding-left:10px;">
    <b><LABEL for="members">{t}Member objects{/t}</LABEL></b>&nbsp;({$combinedObjects})
    <br>
-   <select style="width:100%; height:450px;" id="members" name="members[]" size="15" multiple>
+   <select style="width:100%; height:450px;" id="members" name="members[]" size="15" multiple {$gosaGroupObjectsACL}>
     {$members}
    </select>
    <br>
-   <input type=submit value="{t}Add{/t}" name="edit_membership" {$membersACL}>&nbsp;
-   <input type=submit value="{t}Delete{/t}" name="delete_membership" {$membersACL}>
+   <input type=submit value="{t}Add{/t}" name="edit_membership" {$gosaGroupObjectsACL}>&nbsp;
+   <input type=submit value="{t}Delete{/t}" name="delete_membership" {$gosaGroupObjectsACL}>
   </td>
  </tr>
 </table>