added auto delete module

This commit is contained in:
Roland Gruber 2018-06-29 20:44:36 +02:00
parent 237ba66711
commit 1f23b0314b
17 changed files with 132 additions and 108 deletions

View File

@ -19,6 +19,7 @@ time.
* lib/modules/customFields.inc * lib/modules/customFields.inc
* lib/modules/customScripts.inc * lib/modules/customScripts.inc
* lib/modules/device.inc * lib/modules/device.inc
* lib/modules/autoDelete.inc
* lib/modules/dynamicList.inc * lib/modules/dynamicList.inc
* lib/modules/groupOfNames.inc * lib/modules/groupOfNames.inc
* lib/modules/groupOfNamesUser.inc * lib/modules/groupOfNamesUser.inc

View File

@ -19,6 +19,7 @@ time.
* lib/modules/customFields.inc * lib/modules/customFields.inc
* lib/modules/customScripts.inc * lib/modules/customScripts.inc
* lib/modules/device.inc * lib/modules/device.inc
* lib/modules/autoDelete.inc
* lib/modules/dynamicList.inc * lib/modules/dynamicList.inc
* lib/modules/groupOfNames.inc * lib/modules/groupOfNames.inc
* lib/modules/groupOfNamesUser.inc * lib/modules/groupOfNamesUser.inc

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 B

After

Width:  |  Height:  |  Size: 450 B

View File

@ -102,7 +102,10 @@ class baseType {
* @return array list of descriptions * @return array list of descriptions
*/ */
public function getListAttributeDescriptions() { public function getListAttributeDescriptions() {
return array(); return array(
'entryexpiretimestamp' => _('Deletion time'),
"description" => _("Description"),
);
} }
/** /**

View File

@ -566,10 +566,15 @@ class lamList {
// print all attribute entries seperated by "; " // print all attribute entries seperated by "; "
if (isset($entry[$attribute]) && sizeof($entry[$attribute]) > 0) { if (isset($entry[$attribute]) && sizeof($entry[$attribute]) > 0) {
if (is_array($entry[$attribute])) { if (is_array($entry[$attribute])) {
if (($attribute == 'entryexpiretimestamp') && !empty($entry[$attribute][0])) {
echo formatLDAPTimestamp($entry[$attribute][0]);
}
else {
// sort array // sort array
sort($entry[$attribute]); sort($entry[$attribute]);
echo htmlspecialchars(implode("; ", $entry[$attribute]), ENT_QUOTES, "UTF-8"); echo htmlspecialchars(implode("; ", $entry[$attribute]), ENT_QUOTES, "UTF-8");
} }
}
else { else {
echo htmlspecialchars($entry[$attribute], ENT_QUOTES, "UTF-8"); echo htmlspecialchars($entry[$attribute], ENT_QUOTES, "UTF-8");
} }

View File

@ -38,3 +38,4 @@
/kopano*.inc /kopano*.inc
/dynamicList.inc /dynamicList.inc
/customBaseType.inc /customBaseType.inc
/autoDelete.inc

View File

@ -91,11 +91,13 @@ class asteriskExt extends baseType {
* @return array list of descriptions * @return array list of descriptions
*/ */
function getListAttributeDescriptions() { function getListAttributeDescriptions() {
return array( return array_merge(
parent::getListAttributeDescriptions(),
array(
"astextension" => _("Extension name"), "astextension" => _("Extension name"),
"astcontext" => _("Account context"), "astcontext" => _("Account context"),
"member" => _("Owner"), "member" => _("Owner"),
); ));
} }
/** /**

View File

@ -1,10 +1,9 @@
<?php <?php
/* /*
$Id$
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2008 Thomas Manninger Copyright (C) 2008 Thomas Manninger
2009 - 2017 Roland Gruber 2009 - 2018 Roland Gruber
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -92,11 +91,13 @@ class dhcp extends baseType {
* @return array list of descriptions * @return array list of descriptions
*/ */
public function getListAttributeDescriptions() { public function getListAttributeDescriptions() {
return array ( return array_merge(
parent::getListAttributeDescriptions(),
array (
"cn" => _("Subnet"), "cn" => _("Subnet"),
"dhcprange" => _("Ranges"), "dhcprange" => _("Ranges"),
"fixed_ips" => _("IP address") . ' / ' . _('MAC address') . ' / ' . _("Description") "fixed_ips" => _("IP address") . ' / ' . _('MAC address') . ' / ' . _("Description")
); ));
} }
/** /**

View File

@ -103,7 +103,9 @@ class group extends baseType {
* @return array list of descriptions * @return array list of descriptions
*/ */
function getListAttributeDescriptions() { function getListAttributeDescriptions() {
$return = array ( $return = array_merge(
parent::getListAttributeDescriptions(),
array(
"cn" => _("Group name"), "cn" => _("Group name"),
"description" => _("Group description"), "description" => _("Group description"),
"displayName" => _("Display name"), "displayName" => _("Display name"),
@ -113,7 +115,7 @@ class group extends baseType {
"roleOccupant" => _("Role member DNs"), "roleOccupant" => _("Role member DNs"),
"uniqueMember" => _("Group member DNs"), "uniqueMember" => _("Group member DNs"),
"memberUrl" => _("Entries"), "memberUrl" => _("Entries"),
); ));
if ($this->getType() != null) { if ($this->getType() != null) {
$modules = $this->getType()->getModules(); $modules = $this->getType()->getModules();
if (in_array('organizationalRole', $modules)) { if (in_array('organizationalRole', $modules)) {

View File

@ -89,7 +89,9 @@ class host extends baseType {
* @return array list of descriptions * @return array list of descriptions
*/ */
function getListAttributeDescriptions() { function getListAttributeDescriptions() {
return array ( return array_merge(
parent::getListAttributeDescriptions(),
array (
"uid" => _("Host name"), "uid" => _("Host name"),
"cn" => _("Common name"), "cn" => _("Common name"),
"rid" => _("RID (Windows UID)"), "rid" => _("RID (Windows UID)"),
@ -98,7 +100,7 @@ class host extends baseType {
"gidnumber" => _("GID number"), "gidnumber" => _("GID number"),
'location' => _('Location'), 'location' => _('Location'),
'serialNumber' => _('Serial number') 'serialNumber' => _('Serial number')
); ));
} }
/** /**

View File

@ -1,9 +1,8 @@
<?php <?php
/* /*
$Id$
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2013 Roland Gruber Copyright (C) 2013 - 2018 Roland Gruber
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -89,10 +88,12 @@ class kolabSharedFolderType extends baseType {
* @return array list of descriptions * @return array list of descriptions
*/ */
function getListAttributeDescriptions() { function getListAttributeDescriptions() {
return array ( return array_merge(
parent::getListAttributeDescriptions(),
array (
"kolabDelegate" => _('Delegates'), "kolabDelegate" => _('Delegates'),
'alias' => _('Email aliases'), 'alias' => _('Email aliases'),
); ));
} }
/** /**

View File

@ -1,9 +1,8 @@
<?php <?php
/* /*
$Id$
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2005 - 2012 Roland Gruber Copyright (C) 2005 - 2018 Roland Gruber
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -89,10 +88,12 @@ class mailAlias extends baseType {
* @return array list of descriptions * @return array list of descriptions
*/ */
function getListAttributeDescriptions() { function getListAttributeDescriptions() {
return array( return array_merge(
parent::getListAttributeDescriptions(),
array(
"cn" => _("Alias name"), "cn" => _("Alias name"),
"rfc822mailmember" => _("Recipient list") "rfc822mailmember" => _("Recipient list")
); ));
} }
/** /**

View File

@ -1,9 +1,8 @@
<?php <?php
/* /*
$Id$
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2009 - 2012 Roland Gruber Copyright (C) 2009 - 2018 Roland Gruber
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -89,12 +88,14 @@ class netgroup extends baseType {
* @return array list of descriptions * @return array list of descriptions
*/ */
function getListAttributeDescriptions() { function getListAttributeDescriptions() {
return array ( return array_merge(
parent::getListAttributeDescriptions(),
array (
"cn" => _("Group name"), "cn" => _("Group name"),
'description' => _('Description'), 'description' => _('Description'),
'membernisnetgroup' => _('Subgroups'), 'membernisnetgroup' => _('Subgroups'),
'nisnetgrouptriple' => _('Members') 'nisnetgrouptriple' => _('Members')
); ));
} }
/** /**

View File

@ -1,9 +1,8 @@
<?php <?php
/* /*
$Id$
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2013 - 2017 Roland Gruber Copyright (C) 2013 - 2018 Roland Gruber
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -89,12 +88,13 @@ class pykotaBillingCodeType extends baseType {
* @return array list of descriptions * @return array list of descriptions
*/ */
function getListAttributeDescriptions() { function getListAttributeDescriptions() {
return array ( return array_merge(
parent::getListAttributeDescriptions(),
array(
"cn" => _('Billing code'), "cn" => _('Billing code'),
"description" => _('Description'),
'pykotaBalance' => _('Balance'), 'pykotaBalance' => _('Balance'),
'pykotaPageCounter' => _('Page count'), 'pykotaPageCounter' => _('Page count'),
); ));
} }
/** /**

View File

@ -1,9 +1,8 @@
<?php <?php
/* /*
$Id$
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2013 - 2017 Roland Gruber Copyright (C) 2013 - 2018 Roland Gruber
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -89,13 +88,14 @@ class pykotaPrinterType extends baseType {
* @return array list of descriptions * @return array list of descriptions
*/ */
function getListAttributeDescriptions() { function getListAttributeDescriptions() {
return array ( return array_merge(
parent::getListAttributeDescriptions(),
array(
"cn" => _('Printer name'), "cn" => _('Printer name'),
"description" => _('Description'),
'pykotaPricePerPage' => _('Price per page'), 'pykotaPricePerPage' => _('Price per page'),
'pykotaPricePerJob' => _('Price per job'), 'pykotaPricePerJob' => _('Price per job'),
'pykotaMaxJobSize' => _('Maximum job size'), 'pykotaMaxJobSize' => _('Maximum job size'),
); ));
} }
/** /**

View File

@ -1,9 +1,8 @@
<?php <?php
/* /*
$Id$
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
Copyright (C) 2005 - 2012 Roland Gruber Copyright (C) 2005 - 2018 Roland Gruber
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -89,10 +88,12 @@ class smbDomain extends baseType {
* @return array list of descriptions * @return array list of descriptions
*/ */
function getListAttributeDescriptions() { function getListAttributeDescriptions() {
return array( return array_merge(
parent::getListAttributeDescriptions(),
array(
"sambasid" => _("Domain SID"), "sambasid" => _("Domain SID"),
"sambadomainname" => _("Domain name") "sambadomainname" => _("Domain name")
); ));
} }
/** /**

View File

@ -88,7 +88,9 @@ class user extends baseType {
* @return array list of descriptions * @return array list of descriptions
*/ */
function getListAttributeDescriptions() { function getListAttributeDescriptions() {
return array ( return array_merge(
parent::getListAttributeDescriptions(),
array(
"cn" => _("Common name"), "cn" => _("Common name"),
'company' => _('Company'), 'company' => _('Company'),
'departmentNumber' => _('Department'), 'departmentNumber' => _('Department'),
@ -115,7 +117,7 @@ class user extends baseType {
"uid" => _("User name"), "uid" => _("User name"),
"uidnumber" => _("UID number"), "uidnumber" => _("UID number"),
'userPrincipalName' => _('User name'), 'userPrincipalName' => _('User name'),
); ));
} }
/** /**