summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e63ad5f)
raw | patch | inline | side by side (parent: e63ad5f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 22 Apr 2010 12:20:58 +0000 (12:20 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 22 Apr 2010 12:20:58 +0000 (12:20 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17791 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/generic/references/class_aclResolver.inc | patch | blob | history |
diff --git a/gosa-core/plugins/generic/references/class_aclResolver.inc b/gosa-core/plugins/generic/references/class_aclResolver.inc
index 1ba56b5b3b14158ba18eb95e05fe532bd7297d01..45b61156033e265ae8f56ed627722c719bfdd5dc 100644 (file)
private $renderedList = "";
+ // The users 'dn' and 'uid' used to verify the collected acls
+ private $validateDn;
+ private $validateUid;
+
function __construct($config, $dn, $parent)
{
$this->config = &$config;
$this->dn = $dn;
+ // Replace this with a user defined one later.
+ $ui = get_userinfo();
+ $this->validateUid = $ui->uid;
+ $this->validateDn = $ui->dn;
+
// Get ACL category for the current object.
if(isset($parent->acl_category) && !empty($parent->acl_category)){
$this->acl_category = preg_replace("/\/$/","",$parent->acl_category);
$image = (isset($this->config->idepartments[$dn]))? "images/select_department.png":"images/lists/element.png";
$aclType = $this->aclTypes[$acl['type']];
- // Does the filter match for us?
+ // Does the filter match for current object?
$filter ="";
$match = TRUE;
if(!empty($acl['filter'])){
- $match = $ldap->object_match_filter($ui->dn,$acl['filter']);
+ $match = $ldap->object_match_filter($this->dn,$acl['filter']);
$filter= $acl['filter'];
if(!$match){
$filter= "<span>".$filter."</span>";
if($match){
$found = FALSE;
foreach($acl['members'] as $mem => $desc){
- if($mem == "U:{$ui->dn}"){
+ if($mem == "U:{$this->validateDn}"){
$found = TRUE;
break;
}
$ldap->cat($gdn,array('memberUid'));
if($ldap->count()){
$attrs = $ldap->fetch();
- if(isset($attrs['memberUid']) && in_array($ui->uid, $attrs['memberUid'])){
+ if(isset($attrs['memberUid']) && in_array($this->validateUid, $attrs['memberUid'])){
$found = TRUE;
}
}