From ad88205fbde7fbde13e91bf16eee0807d801e531 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 16 Jun 2024 21:19:44 +0200 Subject: [PATCH] refactoring --- lam/lib/baseModule.inc | 2 +- lam/lib/modules/asteriskAccount.inc | 2 +- lam/lib/modules/asteriskExtension.inc | 2 +- lam/lib/modules/asteriskVoicemail.inc | 2 +- lam/lib/modules/courierMailAccount.inc | 2 +- lam/lib/modules/eduPerson.inc | 2 +- lam/lib/modules/freeRadius.inc | 2 +- lam/lib/modules/ieee802device.inc | 2 +- lam/lib/modules/inetLocalMailRecipient.inc | 2 +- lam/lib/modules/pykotaBillingCode.inc | 2 +- lam/lib/modules/pykotaGroup.inc | 2 +- lam/lib/modules/pykotaPrinter.inc | 2 +- lam/lib/modules/pykotaUser.inc | 2 +- lam/lib/modules/sambaDomain.inc | 2 +- lam/lib/modules/sambaGroupMapping.inc | 2 +- lam/lib/modules/sambaSamAccount.inc | 2 +- lam/lib/modules/shadowAccount.inc | 2 +- lam/lib/modules/windowsGroup.inc | 2 +- lam/lib/modules/windowsHost.inc | 2 +- lam/lib/modules/windowsUser.inc | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc index 27cc2e6d6..1efae2951 100644 --- a/lam/lib/baseModule.inc +++ b/lam/lib/baseModule.inc @@ -64,7 +64,7 @@ abstract class baseModule { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY_DEFAULT = ['uid', 'uidNumber', 'gid', 'gidNumber', + public const ATTRIBUTES_TO_IGNORE_ON_COPY_DEFAULT = ['uid', 'uidNumber', 'gid', 'gidNumber', 'cn', 'userpassword', 'sn', 'givenName', 'initials', 'telephoneNumber', 'homePhone', 'mobile', 'facsimileTelephoneNumber', 'pager', 'mail', 'employeeNumber', 'userCertificate;binary', 'userCertificate', diff --git a/lam/lib/modules/asteriskAccount.inc b/lam/lib/modules/asteriskAccount.inc index dfe6f3293..f443802dc 100644 --- a/lam/lib/modules/asteriskAccount.inc +++ b/lam/lib/modules/asteriskAccount.inc @@ -45,7 +45,7 @@ class asteriskAccount extends baseModule implements passwordService { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['AstAccountCallerID', 'AstAccountRealmedPassword', + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['AstAccountCallerID', 'AstAccountRealmedPassword', 'AstAccountFullContact', 'AstAccountMailbox', 'AstAccountIPAddress']; /** diff --git a/lam/lib/modules/asteriskExtension.inc b/lam/lib/modules/asteriskExtension.inc index 96f54dab0..6e84db08b 100644 --- a/lam/lib/modules/asteriskExtension.inc +++ b/lam/lib/modules/asteriskExtension.inc @@ -47,7 +47,7 @@ class asteriskExtension extends baseModule { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['AstExtension']; + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['AstExtension']; /** if true then only Asterisk accounts are shown as possible owners */ private $filterOwnerForAsteriskAccounts = true; diff --git a/lam/lib/modules/asteriskVoicemail.inc b/lam/lib/modules/asteriskVoicemail.inc index 704ad6a7a..7b027d47b 100644 --- a/lam/lib/modules/asteriskVoicemail.inc +++ b/lam/lib/modules/asteriskVoicemail.inc @@ -43,7 +43,7 @@ class asteriskVoicemail extends baseModule implements passwordService { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['AstVoicemailMailbox', 'AstVoicemailPassword', + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['AstVoicemailMailbox', 'AstVoicemailPassword', 'AstVoicemailEmail', 'AstVoicemailPager', 'AstVoicemailFullname']; /** diff --git a/lam/lib/modules/courierMailAccount.inc b/lam/lib/modules/courierMailAccount.inc index a65a604da..d024e6f2b 100644 --- a/lam/lib/modules/courierMailAccount.inc +++ b/lam/lib/modules/courierMailAccount.inc @@ -45,7 +45,7 @@ class courierMailAccount extends baseModule { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['mailbox']; + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['mailbox']; /** * Creates a new courierMailAccount object. diff --git a/lam/lib/modules/eduPerson.inc b/lam/lib/modules/eduPerson.inc index 5cb16587a..5ccf5867a 100644 --- a/lam/lib/modules/eduPerson.inc +++ b/lam/lib/modules/eduPerson.inc @@ -38,7 +38,7 @@ class eduPerson extends baseModule { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['eduPersonNickname', 'eduPersonPrincipalName']; + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['eduPersonNickname', 'eduPersonPrincipalName']; /** possible affiliation types */ private $affiliationTypes = ['faculty', 'student', 'staff', 'alum', diff --git a/lam/lib/modules/freeRadius.inc b/lam/lib/modules/freeRadius.inc index 1a8c998ea..954c53285 100644 --- a/lam/lib/modules/freeRadius.inc +++ b/lam/lib/modules/freeRadius.inc @@ -38,7 +38,7 @@ class freeRadius extends baseModule { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['radiusFramedIPAddress']; + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['radiusFramedIPAddress']; /** list of possible months */ private static $monthList = ['01' => 'Jan', '02' => 'Feb', '03' => 'Mar', '04' => 'Apr', '05' => 'May', diff --git a/lam/lib/modules/ieee802device.inc b/lam/lib/modules/ieee802device.inc index 885141616..ad0395d12 100644 --- a/lam/lib/modules/ieee802device.inc +++ b/lam/lib/modules/ieee802device.inc @@ -38,7 +38,7 @@ class ieee802device extends baseModule { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['macAddress']; + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['macAddress']; /** * Returns true if this module can manage accounts of the current type, otherwise false. diff --git a/lam/lib/modules/inetLocalMailRecipient.inc b/lam/lib/modules/inetLocalMailRecipient.inc index f157db77a..363032ba7 100644 --- a/lam/lib/modules/inetLocalMailRecipient.inc +++ b/lam/lib/modules/inetLocalMailRecipient.inc @@ -38,7 +38,7 @@ class inetLocalMailRecipient extends baseModule { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['mailLocalAddress', 'mailRoutingAddress']; + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['mailLocalAddress', 'mailRoutingAddress']; /** * Creates a new mitKerberos object. diff --git a/lam/lib/modules/pykotaBillingCode.inc b/lam/lib/modules/pykotaBillingCode.inc index 3aa56d08e..b7247665f 100644 --- a/lam/lib/modules/pykotaBillingCode.inc +++ b/lam/lib/modules/pykotaBillingCode.inc @@ -38,7 +38,7 @@ class pykotaBillingCode extends baseModule { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['pykotaBalance', 'pykotaPageCounter', 'pykotaBillingCode']; + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['pykotaBalance', 'pykotaPageCounter', 'pykotaBillingCode']; /** cache for existing codes (array(dn1 => pykotaBillingCode1, dn2 => pykotaBillingCode2)) */ private $codeCache; diff --git a/lam/lib/modules/pykotaGroup.inc b/lam/lib/modules/pykotaGroup.inc index c03b960d7..cdc3ea32c 100644 --- a/lam/lib/modules/pykotaGroup.inc +++ b/lam/lib/modules/pykotaGroup.inc @@ -40,7 +40,7 @@ class pykotaGroup extends baseModule { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['pykotaGroupName']; + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['pykotaGroupName']; /** cache for cn attribute */ private $cnCache; diff --git a/lam/lib/modules/pykotaPrinter.inc b/lam/lib/modules/pykotaPrinter.inc index be8d6e0c6..e9683f05a 100644 --- a/lam/lib/modules/pykotaPrinter.inc +++ b/lam/lib/modules/pykotaPrinter.inc @@ -38,7 +38,7 @@ class pykotaPrinter extends baseModule { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['pykotaPrinterName']; + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['pykotaPrinterName']; /** cache for existing printers (array(dn => array(cn => ..., description => ...))) */ private $printerCache; diff --git a/lam/lib/modules/pykotaUser.inc b/lam/lib/modules/pykotaUser.inc index 8c94efd74..6e8f9297d 100644 --- a/lam/lib/modules/pykotaUser.inc +++ b/lam/lib/modules/pykotaUser.inc @@ -43,7 +43,7 @@ class pykotaUser extends baseModule { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['pykotaUserName', 'pykotaBalance', 'pykotaLifeTimePaid', + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['pykotaUserName', 'pykotaBalance', 'pykotaLifeTimePaid', 'pykotaPayments']; /** cache for uid attribute */ diff --git a/lam/lib/modules/sambaDomain.inc b/lam/lib/modules/sambaDomain.inc index e37249c80..278618d9b 100644 --- a/lam/lib/modules/sambaDomain.inc +++ b/lam/lib/modules/sambaDomain.inc @@ -38,7 +38,7 @@ class sambaDomain extends baseModule { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['sambaDomainName', 'sambaSID', 'sambaNextRid', + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['sambaDomainName', 'sambaSID', 'sambaNextRid', 'sambaNextGroupRid', 'sambaNextUserRid']; /** diff --git a/lam/lib/modules/sambaGroupMapping.inc b/lam/lib/modules/sambaGroupMapping.inc index aa015ad22..001927ca7 100644 --- a/lam/lib/modules/sambaGroupMapping.inc +++ b/lam/lib/modules/sambaGroupMapping.inc @@ -45,7 +45,7 @@ class sambaGroupMapping extends baseModule { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['sambaSID', 'gidNumber', 'displayName']; + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['sambaSID', 'gidNumber', 'displayName']; // Variables /** Array of well known RIDs */ diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc index 7885ef752..bf3789185 100644 --- a/lam/lib/modules/sambaSamAccount.inc +++ b/lam/lib/modules/sambaSamAccount.inc @@ -58,7 +58,7 @@ class sambaSamAccount extends baseModule implements passwordService, AccountStat /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['sambaSID', 'sambaNTPassword', + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['sambaSID', 'sambaNTPassword', 'sambaPwdLastSet', 'displayName', 'sambaHomePath', 'sambaProfilePath', 'sambaPasswordHistory', 'sambaPwdCanChange', 'sambaPwdMustChange', 'sambaKickoffTime', 'sambaLogonTime', 'sambaLogoffTime']; diff --git a/lam/lib/modules/shadowAccount.inc b/lam/lib/modules/shadowAccount.inc index 66db06e6c..b710afa6c 100644 --- a/lam/lib/modules/shadowAccount.inc +++ b/lam/lib/modules/shadowAccount.inc @@ -44,7 +44,7 @@ class shadowAccount extends baseModule implements passwordService, AccountStatus /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['shadowlastchange', 'shadowexpire']; + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['shadowlastchange', 'shadowexpire']; /** * ID for expired account status. diff --git a/lam/lib/modules/windowsGroup.inc b/lam/lib/modules/windowsGroup.inc index c9ce24a6c..935413d57 100644 --- a/lam/lib/modules/windowsGroup.inc +++ b/lam/lib/modules/windowsGroup.inc @@ -43,7 +43,7 @@ class windowsGroup extends baseModule { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['sAMAccountName', 'msSFU30Name', 'msSFU30NisDomain']; + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['sAMAccountName', 'msSFU30Name', 'msSFU30NisDomain']; /** possible group types (e.g. distribution) */ private $groupTypes; diff --git a/lam/lib/modules/windowsHost.inc b/lam/lib/modules/windowsHost.inc index 35b0eae3b..b97932646 100644 --- a/lam/lib/modules/windowsHost.inc +++ b/lam/lib/modules/windowsHost.inc @@ -39,7 +39,7 @@ class windowsHost extends baseModule { /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['sAMAccountName', 'pwdLastSet', 'lastLogonTimestamp', + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['sAMAccountName', 'pwdLastSet', 'lastLogonTimestamp', 'logonCount']; /** diff --git a/lam/lib/modules/windowsUser.inc b/lam/lib/modules/windowsUser.inc index e6a772d5f..91737c262 100644 --- a/lam/lib/modules/windowsUser.inc +++ b/lam/lib/modules/windowsUser.inc @@ -56,7 +56,7 @@ class windowsUser extends baseModule implements passwordService, AccountStatusPr /** * These attributes will be ignored by default if a new account is copied from an existing one. */ - const ATTRIBUTES_TO_IGNORE_ON_COPY = ['userPrincipalName', 'sAMAccountName', 'displayName', + private const ATTRIBUTES_TO_IGNORE_ON_COPY = ['userPrincipalName', 'sAMAccountName', 'displayName', 'profilePath', 'scriptPath', 'pwdLastSet', 'otherMailbox', 'homeDirectory', 'msSFU30Name', 'pwdLastSet', 'lastLogonTimestamp', 'accountexpires', 'lockouttime'];