X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Fplugins%2Fgeneric%2Freferences%2Fclass_reference.inc;h=f79dec13c6a13b5fe0105253e4c5ff3effd35322;hb=4857c1fe8507ec694d445ebc3e8fceb233450093;hp=433852439d495c58bed02ce59c8c1fe7727d5123;hpb=9d721065e1402837aa9287ad2850ccf19f54eff8;p=gosa.git diff --git a/gosa-core/plugins/generic/references/class_reference.inc b/gosa-core/plugins/generic/references/class_reference.inc index 433852439..f79dec13c 100644 --- a/gosa-core/plugins/generic/references/class_reference.inc +++ b/gosa-core/plugins/generic/references/class_reference.inc @@ -22,17 +22,29 @@ class reference extends plugin { - var $attributes= array('uid'); + var $attributes= array('uid','modifyTimestamp'); var $aclResolver = NULL; var $referenceFilters = array(); var $objectList =""; + var $modifyTimestamp = ""; function reference (&$config, $dn= NULL, $parent = NULL) { // Init the plugin plugin::plugin($config,$dn,$parent); + // Try to read the 'modifyTimestamp' - this has to be done separately. + $ldap = $this->config->get_ldap_link(); + $ldap->cd($this->config->current['BASE']); + $ldap->cat($this->dn, array('modifyTimestamp')); + if($ldap->count()){ + $attrs = $ldap->fetch(); + if(isset($attrs['modifyTimestamp'][0])){ + $this->modifyTimestamp = $attrs['modifyTimestamp'][0]; + } + } + // Initialize the ACL-resolver $this->aclResolver = new aclResolver($this->config, $this->dn, $this); @@ -43,25 +55,25 @@ class reference extends plugin $this->referenceFilters[] = array( 'filter' => "(&(objectClass=posixGroup)(memberUid={$this->uid}))", 'attrs' => array('cn' => _("Name"),'description' => _("Description")), - 'msg' => _("Group")); + 'msg' => _("Group membership")); // Check for group membership in rfc 2307 bis mode $this->referenceFilters[] = array( 'filter' => "(&(objectClass=posixGroup)(member=".normalizeLdap($this->dn)."))", 'attrs' => array('cn' => _("Name"),'description' => _("Description")), - 'msg' => _("Group")." (rfc 2307 bis)"); + 'msg' => _("Group membership")." (rfc 2307 bis)"); // Check for role membership $this->referenceFilters[] = array( 'filter' => "(&(objectClass=organizationalRole)(roleOccupant=".normalizeLdap($this->dn)."))", 'attrs' => array('cn' => _("Name"),'description' => _("Description")), - 'msg' => _("Role")); + 'msg' => _("Role membership")); // Check for objectGroup membership $this->referenceFilters[] = array( 'filter' => "(&(objectClass=gosaGroupOfNames)(member=".normalizeLdap($this->dn)."))", 'attrs' => array('cn' => _("Name"),'description' => _("Description")), - 'msg' => _("Object group")); + 'msg' => _("Object group membership")); // Check for department manager $this->referenceFilters[] = array( @@ -72,14 +84,8 @@ class reference extends plugin // Check for user manager $this->referenceFilters[] = array( 'filter' => "(&(objectClass=gosaAccount)(manager=".normalizeLdap($this->dn)."))", - 'attrs' => array('givenName' => _("Given name"),'sn' => _("Surname"),'uid'=>_("Uid")), + 'attrs' => array('givenName' => _("Given name"),'sn' => _("Surname"),'uid'=>_("UID")), 'msg' => _("User manager")); - } - - function execute() - { - // Mark plugin as viewed - plugin::execute(); // Go through filters and detect possible references $ldap = $this->config->get_ldap_link(); @@ -115,17 +121,47 @@ class reference extends plugin $list->update(); $str .= "