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/customScripts.inc
* lib/modules/device.inc
* lib/modules/autoDelete.inc
* lib/modules/dynamicList.inc
* lib/modules/groupOfNames.inc
* lib/modules/groupOfNamesUser.inc

View File

@ -19,6 +19,7 @@ time.
* lib/modules/customFields.inc
* lib/modules/customScripts.inc
* lib/modules/device.inc
* lib/modules/autoDelete.inc
* lib/modules/dynamicList.inc
* lib/modules/groupOfNames.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
*/
public function getListAttributeDescriptions() {
return array();
return array(
'entryexpiretimestamp' => _('Deletion time'),
"description" => _("Description"),
);
}
/**

View File

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

View File

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

View File

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

View File

@ -1,10 +1,9 @@
<?php
/*
$Id$
This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/)
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
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
*/
public function getListAttributeDescriptions() {
return array (
"cn" => _("Subnet"),
"dhcprange" => _("Ranges"),
"fixed_ips" => _("IP address") . ' / ' . _('MAC address') . ' / ' . _("Description")
);
return array_merge(
parent::getListAttributeDescriptions(),
array (
"cn" => _("Subnet"),
"dhcprange" => _("Ranges"),
"fixed_ips" => _("IP address") . ' / ' . _('MAC address') . ' / ' . _("Description")
));
}
/**

View File

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

View File

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

View File

@ -1,9 +1,8 @@
<?php
/*
$Id$
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
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
*/
function getListAttributeDescriptions() {
return array (
"kolabDelegate" => _('Delegates'),
'alias' => _('Email aliases'),
);
return array_merge(
parent::getListAttributeDescriptions(),
array (
"kolabDelegate" => _('Delegates'),
'alias' => _('Email aliases'),
));
}
/**

View File

@ -1,9 +1,8 @@
<?php
/*
$Id$
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
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
*/
function getListAttributeDescriptions() {
return array(
"cn" => _("Alias name"),
"rfc822mailmember" => _("Recipient list")
);
return array_merge(
parent::getListAttributeDescriptions(),
array(
"cn" => _("Alias name"),
"rfc822mailmember" => _("Recipient list")
));
}
/**

View File

@ -1,9 +1,8 @@
<?php
/*
$Id$
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
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
*/
function getListAttributeDescriptions() {
return array (
"cn" => _("Group name"),
'description' => _('Description'),
'membernisnetgroup' => _('Subgroups'),
'nisnetgrouptriple' => _('Members')
);
return array_merge(
parent::getListAttributeDescriptions(),
array (
"cn" => _("Group name"),
'description' => _('Description'),
'membernisnetgroup' => _('Subgroups'),
'nisnetgrouptriple' => _('Members')
));
}
/**

View File

@ -1,9 +1,8 @@
<?php
/*
$Id$
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
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
*/
function getListAttributeDescriptions() {
return array (
"cn" => _('Billing code'),
"description" => _('Description'),
'pykotaBalance' => _('Balance'),
'pykotaPageCounter' => _('Page count'),
);
return array_merge(
parent::getListAttributeDescriptions(),
array(
"cn" => _('Billing code'),
'pykotaBalance' => _('Balance'),
'pykotaPageCounter' => _('Page count'),
));
}
/**

View File

@ -1,9 +1,8 @@
<?php
/*
$Id$
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
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
*/
function getListAttributeDescriptions() {
return array (
"cn" => _('Printer name'),
"description" => _('Description'),
'pykotaPricePerPage' => _('Price per page'),
'pykotaPricePerJob' => _('Price per job'),
'pykotaMaxJobSize' => _('Maximum job size'),
);
return array_merge(
parent::getListAttributeDescriptions(),
array(
"cn" => _('Printer name'),
'pykotaPricePerPage' => _('Price per page'),
'pykotaPricePerJob' => _('Price per job'),
'pykotaMaxJobSize' => _('Maximum job size'),
));
}
/**

View File

@ -1,9 +1,8 @@
<?php
/*
$Id$
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
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
*/
function getListAttributeDescriptions() {
return array(
"sambasid" => _("Domain SID"),
"sambadomainname" => _("Domain name")
);
return array_merge(
parent::getListAttributeDescriptions(),
array(
"sambasid" => _("Domain SID"),
"sambadomainname" => _("Domain name")
));
}
/**

View File

@ -88,34 +88,36 @@ class user extends baseType {
* @return array list of descriptions
*/
function getListAttributeDescriptions() {
return array (
"cn" => _("Common name"),
'company' => _('Company'),
'departmentNumber' => _('Department'),
'displayName' => _('Display name'),
'employeeNumber' => _('Employee number'),
"gecos" => _("Description"),
"gidnumber" => _("GID number"),
"givenname" => _("First name"),
"homedirectory" => _("Home directory"),
"host" => _("Allowed hosts"),
"jpegphoto" => _('Photo'),
"loginshell" => _("Login shell"),
"mail" => _("Email"),
'manager' => _('Manager'),
'o' => _('Organisation'),
'ou' => _('Organisational unit'),
'proxyAddresses' => _('Proxy-Addresses'),
'sambakickofftime' => _('Account expiration date'),
'shadowexpire' => _('Password expiration'),
"sn" => _("Last name"),
'streetAddress' => _('Street'),
'telephoneNumber' => _('Telephone number'),
'title' => _('Job title'),
"uid" => _("User name"),
"uidnumber" => _("UID number"),
'userPrincipalName' => _('User name'),
);
return array_merge(
parent::getListAttributeDescriptions(),
array(
"cn" => _("Common name"),
'company' => _('Company'),
'departmentNumber' => _('Department'),
'displayName' => _('Display name'),
'employeeNumber' => _('Employee number'),
"gecos" => _("Description"),
"gidnumber" => _("GID number"),
"givenname" => _("First name"),
"homedirectory" => _("Home directory"),
"host" => _("Allowed hosts"),
"jpegphoto" => _('Photo'),
"loginshell" => _("Login shell"),
"mail" => _("Email"),
'manager' => _('Manager'),
'o' => _('Organisation'),
'ou' => _('Organisational unit'),
'proxyAddresses' => _('Proxy-Addresses'),
'sambakickofftime' => _('Account expiration date'),
'shadowexpire' => _('Password expiration'),
"sn" => _("Last name"),
'streetAddress' => _('Street'),
'telephoneNumber' => _('Telephone number'),
'title' => _('Job title'),
"uid" => _("User name"),
"uidnumber" => _("UID number"),
'userPrincipalName' => _('User name'),
));
}
/**