index fc180de9645640b7845bffe5d1076742a730e631..0c3448e09f2a086c79025df542b1aa1eceec9de3 100644 (file)
function convertForListing($entry)
{
$member = implode($entry['members'],", ");
- $acl = implode(array_keys($entry['acl']),", ");
- $type = implode(array_keys($entry['acl']),", ");
+ if(isset($entry['acl']) && is_array($entry['acl'])){
+ $acl = implode(array_keys($entry['acl']),", ");
+ }else{
+ $acl="";
+ }
return(array('data' => array($member, $acl, $this->aclTypes[$entry['type']])));
}
/* Create templating instance */
$smarty= get_smarty();
- $smarty->assign("usePrototype", "true");
+
$smarty->assign("acl_readable",$this->acl_is_readable(""));
if(!$this->acl_is_readable("")){
return ($smarty->fetch (get_template_path('acl.tpl')));
$summary= '<i>'._("No ACL settings for this category!").'</i>';
} else {
$summary= trim($summary,", ");
- $summary= " ".sprintf(_("Contains ACLs for these objects: %s"), $summary);
+ $summary= " ".sprintf(_("ACLs for: %s"), $summary);
}
$actions ="";
/* Role selector if scope is base */
if ($this->aclType == 'role'){
- $smarty->assign('roleSelector', "Role selector");#, $this->buildRoleSelector($this->myAclObjects));
$smarty->assign('roleSelector', $this->buildRoleSelector($this->roles));
}
}
if ($this->dialogState == 'edit'){
- $smarty->assign('headline', sprintf(_("Edit ACL for '%s' - scope is '%s'"), $this->aclObjects[$this->aclObject], $this->aclTypes[$this->aclType]));
+ $smarty->assign('headline', sprintf(_("Edit ACL for '%s' with scope '%s'"), $this->aclObjects[$this->aclObject], $this->aclTypes[$this->aclType]));
/* Collect objects for selected category */
foreach ($this->ocMapping[$this->aclObject] as $idx => $class){
if(count($list) == 5){
list($index, $type,$member,$permission,$filter)= $list;
$filter = base64_decode($filter);
- }else{
+ }elseif(count($list) == 4){
$filter = "";
list($index, $type,$member,$permission)= $list;
+ }else{
+ $permission = "";
+ $filter = "";
+ list($index, $type,$member)= $list;
}
$a= array( $index => array("type" => $type,
if($entry['type'] == "role"){
if(isset($this->roles[$entry['acl']])){
- $summary.= sprintf(_("Role: %s"), $this->roles[$entry['acl']]['cn']);
+ $summary.= sprintf(_("ACL role: %s"), $this->roles[$entry['acl']]['cn']);
}else{
- $summary.= sprintf(_("Role: %s"), "<i>"._("unknown role")."</i>");
+ $summary.= sprintf(_("ACL role: %s"), "<i>"._("unknown ACL role")."</i>");
}
}else{
foreach ($entry['acl'] as $name => $object){
$acl= $this->gosaAclEntry[$this->currentIndex];
$this->aclType= $acl['type'];
$this->recipients= $acl['members'];
- $this->aclContents= $acl['acl'];
+ $this->aclContents= (isset($acl['acl'])) ? $acl['acl'] :"";
$this->aclFilter= $acl['filter'];
}
}
/* ACL's if needed */
+ $final.= ":";
if ($entry['type'] != "reset" && $entry['type'] != "role"){
- $acl= ":";
+ $acl = "";
if (isset($entry['acl'])){
foreach ($entry['acl'] as $object => $contents){
}
$tmp_acl[]= $final;
- }
+ }
/* Call main method */
plugin::save();
"objectClass" => array("gosaAcl","gosaRole"))),
"plProvidedAcls"=> array(
"gosaAclEntry" => _("ACL Entries")
-// "description" => _("Role description")
)
));