diff --git a/lam/HISTORY b/lam/HISTORY index 67ea7ccd..f1ee7b5e 100644 --- a/lam/HISTORY +++ b/lam/HISTORY @@ -1,3 +1,9 @@ +August 2011 3.5.0 + - New module "General information": shows internal data about accounts (e.g. creation time) + - inetOrgPerson: New attributes + - LAM Pro: + -> Automount: allow to create automount maps + 2011-04-25 3.4.0 - IMAP mailboxes: -> support to read user name from uid attribute diff --git a/lam/lib/modules/generalInformation.inc b/lam/lib/modules/generalInformation.inc new file mode 100644 index 00000000..d40f81a6 --- /dev/null +++ b/lam/lib/modules/generalInformation.inc @@ -0,0 +1,128 @@ + array(), 'conflicts' => array()); + // managed attributes + $return['attributes'] = array('creatorsName', 'createTimestamp', 'modifiersName', + 'modifyTimestamp', 'hasSubordinates', 'memberOf', 'pwdChangedTime'); + return $return; + } + + /** + * Returns the HTML meta data for the main account page. + * + * @return htmlElement HTML meta data + */ + public function display_html_attributes() { + $return = new htmlTable(); + // creation info + if (isset($this->attributes['creatorsName'][0])) { + $return->addElement(new htmlOutputText(_('Created by'))); + $return->addElement(new htmlOutputText(getAbstractDN($this->attributes['creatorsName'][0])), true); + } + if (isset($this->attributes['createTimestamp'][0])) { + $return->addElement(new htmlOutputText(_('Creation time'))); + $return->addElement(new htmlOutputText(formatLDAPTimestamp($this->attributes['createTimestamp'][0])), true); + } + if (isset($this->attributes['creatorsName'][0]) || isset($this->attributes['createTimestamp'][0])) { + $return->addElement(new htmlSpacer(null, '5px'), true); + } + // modification info + if (isset($this->attributes['modifiersName'][0])) { + $return->addElement(new htmlOutputText(_('Modified by'))); + $return->addElement(new htmlOutputText(getAbstractDN($this->attributes['modifiersName'][0])), true); + } + if (isset($this->attributes['modifyTimestamp'][0])) { + $return->addElement(new htmlOutputText(_('Modification time'))); + $return->addElement(new htmlOutputText(formatLDAPTimestamp($this->attributes['modifyTimestamp'][0])), true); + } + if (isset($this->attributes['modifiersName'][0]) || isset($this->attributes['modifyTimestamp'][0])) { + $return->addElement(new htmlSpacer(null, '5px'), true); + } + // children + if (isset($this->attributes['hasSubordinates'][0])) { + $hasChilds = _('no'); + if ($this->attributes['hasSubordinates'][0] == 'TRUE') { + $hasChilds = _('yes'); + } + $return->addElement(new htmlOutputText(_('Has children'))); + $return->addElement(new htmlOutputText($hasChilds), true); + $return->addElement(new htmlSpacer(null, '5px'), true); + } + // group memberships + if (isset($this->attributes['memberOf'][0])) { + $groupLabel = new htmlOutputText(_('Groups')); + $groupLabel->alignment = htmlElement::ALIGN_TOP; + $return->addElement($groupLabel); + $groups = new htmlTable(); + for ($i = 0; $i < sizeof($this->attributes['memberOf']); $i++) { + $groups->addElement(new htmlOutputText(getAbstractDN($this->attributes['memberOf'][$i])), true); + } + $return->addElement($groups); + } + return $return; + } + + /** + * Processes user input of the primary module page. + * It checks if all input values are correct and updates the associated LDAP attributes. + * + * @return array list of info/error messages + */ + public function process_attributes() { + return array(); + } + +} + + +?>