index 68df16329fc379e91c59f7e48d215c1d9feda283..423694c8a7df021ab160120ec0dcd4ff85b21b9e 100644 (file)
then return all permissions.
*/
if($this->ignore_acl_for_current_user()){
+ if($skip_write){
+ return("rcdm");
+ }
return("rwcdm");
}
continue;
}
- /* If attribute is "", we want to know, if we've *any* permissions here... */
+ /* If attribute is "", we want to know, if we've *any* permissions here...
+ Merge global class ACLs [0] with attributes specific ACLs [attribute].
+ */
if ($attribute == "" && isset($subacl['acl'][$object])){
foreach($subacl['acl'][$object] as $attr => $dummy){
$acl= $this->mergeACL($acl, $subacl['type'], $subacl['acl'][$object][$attr]);
/* Extract all departments that are accessible (direct or 'on the way' to an
accessible department) */
- function get_module_departments($module)
+ function get_module_departments($module, $skip_self_acls = FALSE )
{
/* If we are forced to skip ACLs checks for the current user
foreach($infos as $info){
$found = FALSE;
foreach($info['acl'] as $cat => $data){
+
+ /* Skip self acls? */
+ if($skip_self_acls && isset($data['0']) && preg_match("//s",$data['0'])) continue;
+
if(is_array($module)){
foreach($module as $mod){
if(preg_match("/^".normalizePreg($mod)."/",$cat)){
$acl = "";
foreach($module as $mod){
if(preg_match("/\//",$mod)){
- $acl.= $this->get_permissions($dn,$mod,"0");
+ $acl.= $this->get_permissions($dn,$mod);
}else{
$acl.= $this->get_category_permissions($dn,$mod);
}
*/
function ignore_acl_for_current_user()
{
- return(isset($this->config->current['IGNORE_ACL']) && $this->config->current['IGNORE_ACL'] == $this->dn);
+ return($this->config->get_cfg_value("ignore_acl") == $this->dn);
}
}