index 9a220b980b699612ef27147d7f581d6740786937..3243c58552ffefc85ed3302c160eaa85e2853569 100644 (file)
$this->base = $_SESSION['CurrentMainBase'];
}
$this->base = $_SESSION['CurrentMainBase'];
}
- /* 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();
}
/* Load member data */
$this->reload();
}
/* Load templating engine */
$smarty= get_smarty();
/* Load templating engine */
$smarty= get_smarty();
+ $tmp = $this->plInfo();
+ foreach($tmp['plProvidedAcls'] as $name => $translation){
+ $smarty->assign($name."ACL",$this->getacl($name));
+ }
+
+
/* Base select dialog */
$once = true;
foreach($_POST as $name => $value){
/* Base select dialog */
$once = true;
foreach($_POST as $name => $value){
/* Fields */
foreach ($this->attributes as $val){
$smarty->assign("$val", $this->$val);
/* Fields */
foreach ($this->attributes as $val){
$smarty->assign("$val", $this->$val);
- $smarty->assign("$val"."ACL", chkacl($this->acl, "$val"));
- }
-
- /* Assign ACL's */
- foreach (array("base", "members") as $val){
- $smarty->assign("$val"."ACL", chkacl($this->acl, "$val"));
}
return ($smarty->fetch (get_template_path('generic.tpl', TRUE)));
}
return ($smarty->fetch (get_template_path('generic.tpl', TRUE)));
/* Save additional values for possible next step */
if (isset($_POST['ogroupedit'])){
plugin::save_object();
/* Save additional values for possible next step */
if (isset($_POST['ogroupedit'])){
plugin::save_object();
-
- if (chkacl ($this->acl, "base") == "" && isset($_POST["base"])){
- $this->base= $_POST["base"];
- }
-
}
}
}
}
$message[]= _("There is already an object with this cn.");
}
$message[]= _("There is already an object with this cn.");
}
- $ui= get_userinfo();
- $acl= get_permissions ($new_dn, $ui->subtreeACL);
- $acl= get_module_permission($acl, "group", $new_dn);
- if (chkacl($acl, "create") != ""){
+ print_a($this);
+ if ($this->acl_is_createable()){
$message[]= _("You have no permissions to create a group on this 'Base'.");
}
/* must: cn */
$message[]= _("You have no permissions to create a group on this 'Base'.");
}
/* must: cn */
- if ($this->cn == "" && chkacl ($this->acl, "cn") == ""){
+ if ($this->cn == "" && $this->acl_is_writeable("cn")){
$message[]= "The required field 'Name' is not set.";
}
$message[]= "The required field 'Name' is not set.";
}
"objectClass" => "gosaGroupOfNames")),
"plProvidedAcls"=> array(
"cn" => _("Name"),
"objectClass" => "gosaGroupOfNames")),
"plProvidedAcls"=> array(
"cn" => _("Name"),
+ "base" => _("Base"),
"description" => _("Description"),
"member" => _("Member"))
));
"description" => _("Description"),
"member" => _("Member"))
));