made can_manage() abstract in baseModule to save memory
This commit is contained in:
parent
6cd040e9c1
commit
11e6a3fb66
|
@ -45,6 +45,15 @@ class hostObject extends baseModule {
|
||||||
$this->autoAddObjectClasses = false;
|
$this->autoAddObjectClasses = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('user'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -56,8 +65,6 @@ class hostObject extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'computer.png';
|
$return['icon'] = 'computer.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array("user");
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("Hosts");
|
$return["alias"] = _("Hosts");
|
||||||
// module dependencies
|
// module dependencies
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$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) 2004 - 2013 Roland Gruber
|
Copyright (C) 2004 - 2014 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
|
||||||
|
@ -34,6 +34,15 @@ $Id$
|
||||||
*/
|
*/
|
||||||
class ieee802device extends baseModule {
|
class ieee802device extends baseModule {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('host'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -45,8 +54,6 @@ class ieee802device extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'network-wired.png';
|
$return['icon'] = 'network-wired.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array("host");
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("MAC address");
|
$return["alias"] = _("MAC address");
|
||||||
// module dependencies
|
// module dependencies
|
||||||
|
|
|
@ -41,6 +41,15 @@ class imapAccess extends baseModule {
|
||||||
/** quota limit from profile */
|
/** quota limit from profile */
|
||||||
private $profileQuotaLimit = null;
|
private $profileQuotaLimit = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('user'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -50,8 +59,6 @@ class imapAccess extends baseModule {
|
||||||
*/
|
*/
|
||||||
function get_metaData() {
|
function get_metaData() {
|
||||||
$return = array();
|
$return = array();
|
||||||
// manages user accounts
|
|
||||||
$return["account_types"] = array("user");
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("Mailbox");
|
$return["alias"] = _("Mailbox");
|
||||||
// module dependencies
|
// module dependencies
|
||||||
|
|
|
@ -34,6 +34,15 @@ $Id$
|
||||||
*/
|
*/
|
||||||
class inetLocalMailRecipient extends baseModule {
|
class inetLocalMailRecipient extends baseModule {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('user'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -45,8 +54,6 @@ class inetLocalMailRecipient extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'mailBig.png';
|
$return['icon'] = 'mailBig.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array("user");
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("Mail routing");
|
$return["alias"] = _("Mail routing");
|
||||||
// module dependencies
|
// module dependencies
|
||||||
|
|
|
@ -106,6 +106,15 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
$this->messages['sendPasswordMail'][0] = array('ERROR', _('Account %s:') . ' inetOrgPerson_sendPasswordMail', _('This value can only be "true" or "false".'));
|
$this->messages['sendPasswordMail'][0] = array('ERROR', _('Account %s:') . ' inetOrgPerson_sendPasswordMail', _('This value can only be "true" or "false".'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('user'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -117,8 +126,6 @@ class inetOrgPerson extends baseModule implements passwordService {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'uid.png';
|
$return['icon'] = 'uid.png';
|
||||||
// manages user accounts
|
|
||||||
$return["account_types"] = array("user");
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _('Personal');
|
$return["alias"] = _('Personal');
|
||||||
// this is a base module
|
// this is a base module
|
||||||
|
|
|
@ -50,6 +50,15 @@ class kolabGroup extends baseModule {
|
||||||
$this->autoAddObjectClasses = false;
|
$this->autoAddObjectClasses = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('group'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -61,8 +70,6 @@ class kolabGroup extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'kolab.png';
|
$return['icon'] = 'kolab.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array('group');
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("Kolab");
|
$return["alias"] = _("Kolab");
|
||||||
// module dependencies
|
// module dependencies
|
||||||
|
|
|
@ -58,6 +58,15 @@ class kolabSharedFolder extends baseModule { // TODO folder type
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('kolabSharedFolderType'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -69,8 +78,6 @@ class kolabSharedFolder extends baseModule { // TODO folder type
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'kolab.png';
|
$return['icon'] = 'kolab.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array('kolabSharedFolderType');
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("Kolab shared folder");
|
$return["alias"] = _("Kolab shared folder");
|
||||||
// this is a base module
|
// this is a base module
|
||||||
|
|
|
@ -56,6 +56,15 @@ class kolabUser extends baseModule {
|
||||||
$this->autoAddObjectClasses = false;
|
$this->autoAddObjectClasses = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('user'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -67,8 +76,6 @@ class kolabUser extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'kolab.png';
|
$return['icon'] = 'kolab.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array("user");
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("Kolab");
|
$return["alias"] = _("Kolab");
|
||||||
// module dependencies
|
// module dependencies
|
||||||
|
|
|
@ -38,6 +38,15 @@ class ldapPublicKey extends baseModule {
|
||||||
/** session variable for existing keys in self service */
|
/** session variable for existing keys in self service */
|
||||||
const SESS_KEY_LIST = 'ldapPublicKey_keyList';
|
const SESS_KEY_LIST = 'ldapPublicKey_keyList';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('user'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -49,8 +58,6 @@ class ldapPublicKey extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'keyBig.png';
|
$return['icon'] = 'keyBig.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array("user");
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("SSH public key");
|
$return["alias"] = _("SSH public key");
|
||||||
// module dependencies
|
// module dependencies
|
||||||
|
|
|
@ -41,6 +41,15 @@ class nisMailAlias extends baseModule {
|
||||||
/** display limit */
|
/** display limit */
|
||||||
const DISPLAY_LIMIT = 50;
|
const DISPLAY_LIMIT = 50;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('mailAlias'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -52,8 +61,6 @@ class nisMailAlias extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'mailBig.png';
|
$return['icon'] = 'mailBig.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array("mailAlias");
|
|
||||||
// base module
|
// base module
|
||||||
$return["is_base"] = true;
|
$return["is_base"] = true;
|
||||||
// LDAP filter
|
// LDAP filter
|
||||||
|
|
|
@ -46,6 +46,15 @@ class nisMailAliasUser extends baseModule {
|
||||||
/** alias entries to extend with new recipients (list of arrays: dn => recipients) */
|
/** alias entries to extend with new recipients (list of arrays: dn => recipients) */
|
||||||
private $recipientsToAdd = array();
|
private $recipientsToAdd = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('user'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -57,8 +66,6 @@ class nisMailAliasUser extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'mailBig.png';
|
$return['icon'] = 'mailBig.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array("user");
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("Mail aliases");
|
$return["alias"] = _("Mail aliases");
|
||||||
// module dependencies
|
// module dependencies
|
||||||
|
|
|
@ -43,6 +43,15 @@ class nisnetgroup extends baseModule {
|
||||||
/** group cache */
|
/** group cache */
|
||||||
private $cachedGroupList = null;
|
private $cachedGroupList = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('netgroup'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -54,8 +63,6 @@ class nisnetgroup extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'groupBig.png';
|
$return['icon'] = 'groupBig.png';
|
||||||
// manages netgroup accounts
|
|
||||||
$return["account_types"] = array('netgroup');
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("NIS net group");
|
$return["alias"] = _("NIS net group");
|
||||||
// this is a base module
|
// this is a base module
|
||||||
|
|
|
@ -131,6 +131,15 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
$this->messages['sambaIDPoolDN'][0] = array('ERROR', _('Samba ID pool DN'), _('This is not a valid DN!'));
|
$this->messages['sambaIDPoolDN'][0] = array('ERROR', _('Samba ID pool DN'), _('This is not a valid DN!'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('user', 'host'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -142,8 +151,6 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'tux.png';
|
$return['icon'] = 'tux.png';
|
||||||
// manages user and host accounts
|
|
||||||
$return["account_types"] = array("user", "host");
|
|
||||||
// user specific data
|
// user specific data
|
||||||
if ($this->get_scope() == "user") {
|
if ($this->get_scope() == "user") {
|
||||||
// LDAP filter
|
// LDAP filter
|
||||||
|
|
|
@ -345,6 +345,15 @@ class posixGroup extends baseModule implements passwordService {
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('group'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -354,8 +363,6 @@ class posixGroup extends baseModule implements passwordService {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'tux.png';
|
$return['icon'] = 'tux.png';
|
||||||
// manages group accounts
|
|
||||||
$return["account_types"] = array("group");
|
|
||||||
if ($this->get_scope() == "group") {
|
if ($this->get_scope() == "group") {
|
||||||
// this is a base module
|
// this is a base module
|
||||||
$return["is_base"] = true;
|
$return["is_base"] = true;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
This code is not yet part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
This code is not yet part of LDAP Account Manager (http://www.ldap-account-manager.org/)
|
||||||
Copyright (C) 2012 - 2013 Roland Gruber
|
Copyright (C) 2012 - 2014 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
|
||||||
|
@ -48,7 +48,16 @@ class puppetClient extends baseModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('host'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
* @return array array with meta data
|
* @return array array with meta data
|
||||||
|
@ -57,8 +66,6 @@ class puppetClient extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'puppet.png';
|
$return['icon'] = 'puppet.png';
|
||||||
// manages user accounts
|
|
||||||
$return["account_types"] = array("host");
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("Puppet");
|
$return["alias"] = _("Puppet");
|
||||||
// module dependencies
|
// module dependencies
|
||||||
|
|
|
@ -37,6 +37,15 @@ class pykotaBillingCode extends baseModule {
|
||||||
/** cache for existing codes (array(dn1 => pykotaBillingCode1, dn2 => pykotaBillingCode2)) */
|
/** cache for existing codes (array(dn1 => pykotaBillingCode1, dn2 => pykotaBillingCode2)) */
|
||||||
private $codeCache = null;
|
private $codeCache = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('pykotaBillingCodeType'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -48,8 +57,6 @@ class pykotaBillingCode extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'printerBig.png';
|
$return['icon'] = 'printerBig.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array('pykotaBillingCodeType');
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("PyKota");
|
$return["alias"] = _("PyKota");
|
||||||
// this is a base module
|
// this is a base module
|
||||||
|
|
|
@ -69,6 +69,15 @@ class pykotaGroup extends baseModule {
|
||||||
$this->autoAddObjectClasses = $this->isStructural();
|
$this->autoAddObjectClasses = $this->isStructural();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('group'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -80,8 +89,6 @@ class pykotaGroup extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'printerBig.png';
|
$return['icon'] = 'printerBig.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array('group');
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("PyKota");
|
$return["alias"] = _("PyKota");
|
||||||
// this is a base module
|
// this is a base module
|
||||||
|
|
|
@ -55,6 +55,15 @@ class pykotaPrinter extends baseModule {
|
||||||
parent::__construct($scope);
|
parent::__construct($scope);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('pykotaPrinterType'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -66,8 +75,6 @@ class pykotaPrinter extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'printerBig.png';
|
$return['icon'] = 'printerBig.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array('pykotaPrinterType');
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("PyKota");
|
$return["alias"] = _("PyKota");
|
||||||
// this is a base module
|
// this is a base module
|
||||||
|
|
|
@ -69,6 +69,15 @@ class pykotaUser extends baseModule {
|
||||||
$this->autoAddObjectClasses = $this->isStructural();
|
$this->autoAddObjectClasses = $this->isStructural();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('user'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -80,8 +89,6 @@ class pykotaUser extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'printerBig.png';
|
$return['icon'] = 'printerBig.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array('user');
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("PyKota");
|
$return["alias"] = _("PyKota");
|
||||||
// this is a base module
|
// this is a base module
|
||||||
|
|
|
@ -63,6 +63,15 @@ class quota extends baseModule {
|
||||||
$this->messages['upload'][0] = array('ERROR', _('Account %s:') . ' %s', _('Quota has wrong format!'));
|
$this->messages['upload'][0] = array('ERROR', _('Account %s:') . ' %s', _('Quota has wrong format!'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('user', 'group'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -74,8 +83,6 @@ class quota extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'hard-driveBig.png';
|
$return['icon'] = 'hard-driveBig.png';
|
||||||
// manages user and group accounts
|
|
||||||
$return["account_types"] = array("user", "group");
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _('Quota');
|
$return["alias"] = _('Quota');
|
||||||
if ($this->get_scope() == 'group') {
|
if ($this->get_scope() == 'group') {
|
||||||
|
|
|
@ -52,6 +52,15 @@ class range extends baseModule {
|
||||||
/** For check, if IPs overlaped. */
|
/** For check, if IPs overlaped. */
|
||||||
public $overlaped;
|
public $overlaped;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('dhcp'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -61,8 +70,6 @@ class range extends baseModule {
|
||||||
*/
|
*/
|
||||||
public function get_metaData() {
|
public function get_metaData() {
|
||||||
$return = array();
|
$return = array();
|
||||||
// manages dhcp accounts
|
|
||||||
$return["account_types"] = array("dhcp");
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("Ranges");
|
$return["alias"] = _("Ranges");
|
||||||
// this is a base module
|
// this is a base module
|
||||||
|
|
|
@ -34,6 +34,15 @@ $Id$
|
||||||
*/
|
*/
|
||||||
class sambaDomain extends baseModule {
|
class sambaDomain extends baseModule {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('smbDomain'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -45,8 +54,6 @@ class sambaDomain extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'samba.png';
|
$return['icon'] = 'samba.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array("smbDomain");
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("Samba domain");
|
$return["alias"] = _("Samba domain");
|
||||||
// this is a base module
|
// this is a base module
|
||||||
|
|
|
@ -4,7 +4,7 @@ $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) 2003 - 2006 Tilo Lutz
|
Copyright (C) 2003 - 2006 Tilo Lutz
|
||||||
2007 - 2013 Roland Gruber
|
2007 - 2014 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
|
||||||
|
@ -77,6 +77,15 @@ class sambaGroupMapping extends baseModule {
|
||||||
$this->autoAddObjectClasses = false;
|
$this->autoAddObjectClasses = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('group'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -88,8 +97,6 @@ class sambaGroupMapping extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'samba.png';
|
$return['icon'] = 'samba.png';
|
||||||
// manages group accounts
|
|
||||||
$return["account_types"] = array("group");
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _('Samba 3');
|
$return["alias"] = _('Samba 3');
|
||||||
// module dependencies
|
// module dependencies
|
||||||
|
|
|
@ -122,6 +122,15 @@ class sambaSamAccount extends baseModule implements passwordService {
|
||||||
$this->messages['profileCanMustChange'][0] = array('ERROR', _('The value for the Samba 3 field "User can/must change password" needs to be a number.'));
|
$this->messages['profileCanMustChange'][0] = array('ERROR', _('The value for the Samba 3 field "User can/must change password" needs to be a number.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('user', 'host'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -133,8 +142,6 @@ class sambaSamAccount extends baseModule implements passwordService {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'samba.png';
|
$return['icon'] = 'samba.png';
|
||||||
// manages user and host accounts
|
|
||||||
$return["account_types"] = array("user", "host");
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _('Samba 3');
|
$return["alias"] = _('Samba 3');
|
||||||
// RDN attribute
|
// RDN attribute
|
||||||
|
|
|
@ -67,6 +67,15 @@ class shadowAccount extends baseModule implements passwordService {
|
||||||
$this->messages['shadow_expireDate'][0] = array('ERROR', _('Account %s:') . ' shadowAccount_expireDate', _('The expiration date is invalid.'));
|
$this->messages['shadow_expireDate'][0] = array('ERROR', _('Account %s:') . ' shadowAccount_expireDate', _('The expiration date is invalid.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('user'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -78,8 +87,6 @@ class shadowAccount extends baseModule implements passwordService {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'keyBig.png';
|
$return['icon'] = 'keyBig.png';
|
||||||
// manages user accounts
|
|
||||||
$return["account_types"] = array("user");
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _('Shadow');
|
$return["alias"] = _('Shadow');
|
||||||
// module dependencies
|
// module dependencies
|
||||||
|
|
|
@ -34,6 +34,15 @@ $Id$
|
||||||
*/
|
*/
|
||||||
class systemQuotas extends baseModule {
|
class systemQuotas extends baseModule {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('user'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -45,8 +54,6 @@ class systemQuotas extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'hard-driveBig.png';
|
$return['icon'] = 'hard-driveBig.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array('user');
|
|
||||||
// alias name
|
// alias name
|
||||||
$return["alias"] = _("Quota");
|
$return["alias"] = _("Quota");
|
||||||
// module dependencies
|
// module dependencies
|
||||||
|
|
|
@ -69,6 +69,15 @@ class windowsGroup extends baseModule {
|
||||||
parent::__construct($scope);
|
parent::__construct($scope);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('group'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -80,8 +89,6 @@ class windowsGroup extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'samba.png';
|
$return['icon'] = 'samba.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array('group');
|
|
||||||
// this is a base module
|
// this is a base module
|
||||||
$return["is_base"] = true;
|
$return["is_base"] = true;
|
||||||
// RDN attribute
|
// RDN attribute
|
||||||
|
|
|
@ -34,6 +34,15 @@ $Id$
|
||||||
*/
|
*/
|
||||||
class windowsHost extends baseModule {
|
class windowsHost extends baseModule {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('host'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -45,8 +54,6 @@ class windowsHost extends baseModule {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'samba.png';
|
$return['icon'] = 'samba.png';
|
||||||
// manages host accounts
|
|
||||||
$return["account_types"] = array('host');
|
|
||||||
// this is a base module
|
// this is a base module
|
||||||
$return["is_base"] = true;
|
$return["is_base"] = true;
|
||||||
// RDN attribute
|
// RDN attribute
|
||||||
|
|
|
@ -57,6 +57,15 @@ class windowsUser extends baseModule implements passwordService {
|
||||||
private $clearTextPassword;
|
private $clearTextPassword;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this module can manage accounts of the current type, otherwise false.
|
||||||
|
*
|
||||||
|
* @return boolean true if module fits
|
||||||
|
*/
|
||||||
|
public function can_manage() {
|
||||||
|
return in_array($this->get_scope(), array('user'));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns meta data that is interpreted by parent class
|
* Returns meta data that is interpreted by parent class
|
||||||
*
|
*
|
||||||
|
@ -68,8 +77,6 @@ class windowsUser extends baseModule implements passwordService {
|
||||||
$return = array();
|
$return = array();
|
||||||
// icon
|
// icon
|
||||||
$return['icon'] = 'samba.png';
|
$return['icon'] = 'samba.png';
|
||||||
// manages user accounts
|
|
||||||
$return["account_types"] = array('user');
|
|
||||||
// this is a base module
|
// this is a base module
|
||||||
$return["is_base"] = true;
|
$return["is_base"] = true;
|
||||||
// PHP extensions
|
// PHP extensions
|
||||||
|
|
Loading…
Reference in New Issue