new type API
This commit is contained in:
parent
b57cdea3fc
commit
851f8b5bb7
|
@ -20,6 +20,7 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -70,9 +71,11 @@ This is a list of API changes for all LAM releases.
|
|||
<li>getManagedAttributes()</li>
|
||||
<li>getLDAPAliases() <br>
|
||||
</li>
|
||||
<li>get_uploadColumns()<br>
|
||||
<li>get_uploadColumns()</li>
|
||||
<li>build_uploadAccounts()<br>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
<li>baseType->doUploadPostActions(): new parameter $selectedModules<br>
|
||||
</li>
|
||||
|
|
|
@ -894,9 +894,10 @@ abstract class baseModule {
|
|||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @param ConfiguredType $type account type
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
public function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
public function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
// must be implemented in sub modules
|
||||
return array();
|
||||
}
|
||||
|
|
|
@ -465,20 +465,20 @@ function getUploadColumns(&$type, $selectedModules) {
|
|||
*
|
||||
* If there are problems status messages will be printed automatically.
|
||||
*
|
||||
* @param string $scope account type
|
||||
* @param ConfiguredType $type account type
|
||||
* @param array $data array containing one account in each element
|
||||
* @param array $ids array(<column_name> => <column number>)
|
||||
* @param array $selectedModules selected account modules
|
||||
* @return mixed array including accounts or false if there were errors
|
||||
*/
|
||||
function buildUploadAccounts($scope, $data, $ids, $selectedModules) {
|
||||
function buildUploadAccounts($type, $data, $ids, $selectedModules) {
|
||||
// build module order
|
||||
$unOrdered = $selectedModules;
|
||||
$ordered = array();
|
||||
$predepends = array();
|
||||
// get dependencies
|
||||
for ($i = 0; $i < sizeof($unOrdered); $i++) {
|
||||
$mod = moduleCache::getModule($unOrdered[$i], $scope);
|
||||
$mod = moduleCache::getModule($unOrdered[$i], $type->getScope());
|
||||
$predepends[$unOrdered[$i]] = $mod->get_uploadPreDepends();
|
||||
}
|
||||
// first all modules without predepends can be ordered
|
||||
|
@ -523,8 +523,8 @@ function buildUploadAccounts($scope, $data, $ids, $selectedModules) {
|
|||
$partialAccounts[$i]['objectClass'] = array();
|
||||
}
|
||||
for ($i = 0; $i < sizeof($ordered); $i++) {
|
||||
$module = new $ordered[$i]($scope);
|
||||
$errors = $module->build_uploadAccounts($data, $ids, $partialAccounts, $selectedModules);
|
||||
$module = new $ordered[$i]($type->getScope());
|
||||
$errors = $module->build_uploadAccounts($data, $ids, $partialAccounts, $selectedModules, $type);
|
||||
if (sizeof($errors) > 0) {
|
||||
array_unshift($errors, array("INFO", _("Displayed account numbers start at \"0\". Add 2 to get the row in your spreadsheet."), ""));
|
||||
$errors[] = array("ERROR", _("Upload was stopped after errors in %s module!"), "", array($module->get_alias()));
|
||||
|
|
|
@ -265,15 +265,10 @@ class account extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -1017,15 +1017,10 @@ class asteriskAccount extends baseModule implements passwordService {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -841,15 +841,10 @@ class asteriskExtension extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
//hash to strore extension_name => priority. For new extensoin priority will be 1
|
||||
$extensionNamePriorityMap = array();
|
||||
|
|
|
@ -378,15 +378,10 @@ class asteriskVoicemail extends baseModule implements passwordService {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -201,15 +201,10 @@ class authorizedServiceObject extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -645,16 +645,11 @@ class ddns extends baseModule {
|
|||
// load nothing, attributes are saved in "dhcp_settings" module
|
||||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
if (!$this->check_if_ddns_is_enable()) {
|
||||
return $messages;
|
||||
|
|
|
@ -846,15 +846,10 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -462,15 +462,10 @@ class eduPerson extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -624,15 +624,10 @@ class freeRadius extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$errors = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -175,15 +175,10 @@ class hostObject extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -133,15 +133,10 @@ class ieee802device extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -318,15 +318,10 @@ class inetLocalMailRecipient extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -2168,15 +2168,10 @@ class inetOrgPerson extends baseModule implements passwordService {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$errors = array();
|
||||
// get list of existing users
|
||||
$existingUsers = searchLDAPByAttribute('uid', '*', 'inetOrgPerson', array('uid'), array('user'));
|
||||
|
|
|
@ -347,15 +347,10 @@ class kolabGroup extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// check if extension should be added
|
||||
|
|
|
@ -447,15 +447,10 @@ class kolabSharedFolder extends baseModule { // TODO folder type
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
$delegates = searchLDAPByAttribute(null, null, 'inetOrgPerson', array('mail'), array('user'));
|
||||
for ($d = 0; $d < sizeof($delegates); $d++) {
|
||||
|
|
|
@ -595,15 +595,10 @@ class kolabUser extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
$delegates = searchLDAPByAttribute(null, null, 'inetOrgPerson', array('mail'), array('user'));
|
||||
for ($d = 0; $d < sizeof($delegates); $d++) {
|
||||
|
|
|
@ -262,15 +262,10 @@ class ldapPublicKey extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -429,15 +429,10 @@ class nisMailAlias extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -495,15 +495,10 @@ class nisNetGroupUser extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$errors = array();
|
||||
// get list of existing group of names
|
||||
$groups = $this->findGroups();
|
||||
|
|
|
@ -518,15 +518,10 @@ class nisnetgroup extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
// get list of existing groups
|
||||
$existingGroups = $this->getGroupList();
|
||||
|
|
|
@ -2120,15 +2120,10 @@ class posixAccount extends baseModule implements passwordService {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$errors = array();
|
||||
$pwdAttrName = $this->getPasswordAttrName($selectedModules);
|
||||
$homedirAttrName = $this->getHomedirAttrName($selectedModules);
|
||||
|
|
|
@ -81,15 +81,10 @@ class posixGroup extends baseModule implements passwordService {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$error_messages = array();
|
||||
$needAutoGID = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
|
|
|
@ -351,15 +351,10 @@ class puppetClient extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -208,15 +208,10 @@ class pykotaBillingCode extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
$this->loadCodeCache();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
|
|
|
@ -400,15 +400,10 @@ class pykotaGroup extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object classes
|
||||
|
|
|
@ -450,15 +450,10 @@ class pykotaPrinter extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
$this->loadPrinterNameCache();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
|
|
|
@ -765,15 +765,10 @@ class pykotaUser extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object classes
|
||||
|
|
|
@ -553,15 +553,10 @@ class sambaDomain extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -233,15 +233,10 @@ class sambaGroupMapping extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
// search existing Samba 3 domains
|
||||
$domains = $this->getDomains();
|
||||
$nameToSID = array();
|
||||
|
|
|
@ -1997,15 +1997,10 @@ class sambaSamAccount extends baseModule implements passwordService {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$errors = array();
|
||||
// get list of Samba 3 domains
|
||||
$domains = $this->getDomains();
|
||||
|
|
|
@ -573,15 +573,10 @@ class shadowAccount extends baseModule implements passwordService {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -346,15 +346,10 @@ class systemQuotas extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
public function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
public function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$messages = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -811,15 +811,10 @@ class windowsGroup extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
public function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
public function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$errors = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -243,15 +243,10 @@ class windowsHost extends baseModule {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
public function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
public function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$errors = array();
|
||||
for ($i = 0; $i < sizeof($rawAccounts); $i++) {
|
||||
// add object class
|
||||
|
|
|
@ -1944,15 +1944,10 @@ class windowsUser extends baseModule implements passwordService {
|
|||
}
|
||||
|
||||
/**
|
||||
* In this function the LDAP account is built up.
|
||||
*
|
||||
* @param array $rawAccounts list of hash arrays (name => value) from user input
|
||||
* @param array $ids list of IDs for column position (e.g. "posixAccount_uid" => 5)
|
||||
* @param array $partialAccounts list of hash arrays (name => value) which are later added to LDAP
|
||||
* @param array $selectedModules list of selected account modules
|
||||
* @return array list of error messages if any
|
||||
*/
|
||||
public function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules) {
|
||||
* {@inheritDoc}
|
||||
* @see baseModule::build_uploadAccounts()
|
||||
*/
|
||||
public function build_uploadAccounts($rawAccounts, $ids, &$partialAccounts, $selectedModules, &$type) {
|
||||
$errors = array();
|
||||
// get list of existing groups
|
||||
$groupList = $this->findGroups();
|
||||
|
|
|
@ -200,7 +200,7 @@ if ($_FILES['inputfile'] && ($_FILES['inputfile']['size'] > 0)) {
|
|||
|
||||
// let modules build accounts
|
||||
else {
|
||||
$accounts = buildUploadAccounts($type->getScope(), $data, $ids, $selectedModules);
|
||||
$accounts = buildUploadAccounts($type, $data, $ids, $selectedModules);
|
||||
if ($accounts != false) {
|
||||
$rdnList = getRDNAttributes($type->getId(), $selectedModules);
|
||||
$suffix = $type->getSuffix();
|
||||
|
|
Loading…
Reference in New Issue