summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d1ba34b)
raw | patch | inline | side by side (parent: d1ba34b)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 Jul 2006 07:39:24 +0000 (07:39 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 Jul 2006 07:39:24 +0000 (07:39 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4091 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/acl/class_acl.inc | patch | blob | history |
index cf904605e1f9d06dd4dc47bb2f497f405258102c..1a1539eecf487e92b455ef997050e277800e774f 100644 (file)
$this->ocMapping[$class][]= $oc;
}
}
+ $this->is_account= TRUE;
}
foreach ($this->gosaAclEntry as $prio => $entry){
$final= "";
$members= "";
- foreach ($entry['members'] as $key => $dummy){
- $members.= base64_encode(preg_replace('/^.:/', '', $key)).',';
+ if (isset($entry['members'])){
+ foreach ($entry['members'] as $key => $dummy){
+ $members.= base64_encode(preg_replace('/^.:/', '', $key)).',';
+ }
}
$final= $prio.":".$entry['type'].":".preg_replace('/,$/', '', $members);
/* ACL's if needed */
if ($entry['type'] != "reset" && $entry['type'] != "role"){
$acl= ":";
- foreach ($entry['acl'] as $object => $contents){
- $acl.= $object.";";
-
- foreach($contents as $attr => $permission){
-
- /* First entry? Its the one for global settings... */
- if ($attr == '0'){
- $acl.= $permission;
- } else {
- $acl.= '#'.$attr.';'.$permission;
- }
+ if (isset($entry['acl'])){
+ foreach ($entry['acl'] as $object => $contents){
+ $acl.= $object.";";
+
+ foreach($contents as $attr => $permission){
+
+ /* First entry? Its the one for global settings... */
+ if ($attr == '0'){
+ $acl.= $permission;
+ } else {
+ $acl.= '#'.$attr.';'.$permission;
+ }
+ }
+ $acl.= ',';
+
}
- $acl.= ',';
-
}
$final.= preg_replace('/,$/', '', $acl);
}
$tmp_acl[]= $final;
}
- /* Finally (re-)assign it... */
- $this->gosaAclEntry= $tmp_acl;
-
/* Call main method */
plugin::save();
+ /* Finally (re-)assign it... */
+ $this->attrs['gosaAclEntry']= $tmp_acl;
+
/* Remove acl from this entry if it is empty... */
- if (!count($this->gosaAclEntry)){
+ if (!count($tmp_acl)){
/* Remove attribute */
if ($this->initially_was_account){
- $attrs['gosaAclEntry']= array();
+ $this->attrs['gosaAclEntry']= array();
} else {
- unset($attrs['gosaAclEntry']);
+ if (isset($this->attrs['gosaAclEntry'])){
+ unset($this->attrs['gosaAclEntry']);
+ }
}
/* Remove object class */