removed mail aliases

This commit is contained in:
Roland Gruber 2013-11-18 17:39:59 +00:00
parent b1d5aa8ac2
commit b323d66ffd
1 changed files with 1 additions and 45 deletions

View File

@ -95,7 +95,7 @@ class windowsGroup extends baseModule {
// managed object classes // managed object classes
$return['objectClasses'] = array('group', 'securityPrincipal', 'mailRecipient'); $return['objectClasses'] = array('group', 'securityPrincipal', 'mailRecipient');
// managed attributes // managed attributes
$return['attributes'] = array('cn', 'description', 'info', 'mail', 'member', 'sAMAccountName', 'groupType', 'otherMailbox', 'managedBy'); $return['attributes'] = array('cn', 'description', 'info', 'mail', 'member', 'sAMAccountName', 'groupType', 'managedBy');
// help Entries // help Entries
$return['help'] = array( $return['help'] = array(
'hiddenOptions' => array( 'hiddenOptions' => array(
@ -118,14 +118,6 @@ class windowsGroup extends baseModule {
"Headline" => _('Email address'), 'attr' => 'mail', "Headline" => _('Email address'), 'attr' => 'mail',
"Text" => _('The list\'s email address.') "Text" => _('The list\'s email address.')
), ),
'otherMailbox' => array(
"Headline" => _("Email alias"), 'attr' => 'otherMailbox',
"Text" => _("Email alias for this account.")
),
'otherMailboxList' => array(
"Headline" => _("Email alias"), 'attr' => 'otherMailbox',
"Text" => _("Email alias for this account.") . ' ' . _("Multiple values are separated by semicolon.")
),
'member' => array( 'member' => array(
"Headline" => _('Members'), 'attr' => 'member', "Headline" => _('Members'), 'attr' => 'member',
"Text" => _('This is a list of members of this group.') "Text" => _('This is a list of members of this group.')
@ -156,8 +148,6 @@ class windowsGroup extends baseModule {
$configContainer->addElement($configContainerHead, true); $configContainer->addElement($configContainerHead, true);
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsGroup_hidemail', false, _('Email address'), null, false)); $configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsGroup_hidemail', false, _('Email address'), null, false));
$configContainerOptions->addElement(new htmlOutputText(' ')); $configContainerOptions->addElement(new htmlOutputText(' '));
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsGroup_hideotherMailbox', false, _('Email alias'), null, false));
$configContainerOptions->addElement(new htmlOutputText(' '));
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsGroup_hidemanagedBy', false, _('Managed by'), null, false)); $configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('windowsGroup_hidemanagedBy', false, _('Managed by'), null, false));
$configContainer->addElement($configContainerOptions, true); $configContainer->addElement($configContainerOptions, true);
$return['config_options']['all'] = $configContainer; $return['config_options']['all'] = $configContainer;
@ -213,14 +203,6 @@ class windowsGroup extends baseModule {
'example' => _('group@company.com'), 'example' => _('group@company.com'),
); );
} }
if (!$this->isBooleanConfigOptionSet('windowsGroup_hideotherMailbox')) {
$return['upload_columns'][] = array(
'name' => 'windowsGroup_otherMailbox',
'description' => _('Email alias'),
'help' => 'otherMailboxList',
'example' => _('group@company.com'),
);
}
if (!$this->isBooleanConfigOptionSet('windowsGroup_hidemanagedBy')) { if (!$this->isBooleanConfigOptionSet('windowsGroup_hidemanagedBy')) {
$return['upload_columns'][] = array( $return['upload_columns'][] = array(
'name' => 'windowsGroup_managedBy', 'name' => 'windowsGroup_managedBy',
@ -241,9 +223,6 @@ class windowsGroup extends baseModule {
if (!$this->isBooleanConfigOptionSet('windowsGroup_hidemail')) { if (!$this->isBooleanConfigOptionSet('windowsGroup_hidemail')) {
$return['PDF_fields']['mail'] = _('Email address'); $return['PDF_fields']['mail'] = _('Email address');
} }
if (!$this->isBooleanConfigOptionSet('windowsGroup_hideotherMailbox')) {
$return['PDF_fields']['otherMailbox'] = _('Email alias');
}
if (!$this->isBooleanConfigOptionSet('windowsGroup_hidemanagedBy')) { if (!$this->isBooleanConfigOptionSet('windowsGroup_hidemanagedBy')) {
$return['PDF_fields']['managedBy'] = _('Managed by'); $return['PDF_fields']['managedBy'] = _('Managed by');
} }
@ -258,8 +237,6 @@ class windowsGroup extends baseModule {
$this->messages['cn'][1] = array('ERROR', _('Account %s:') . ' windowsGroup_cn', _('Group name contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and .-_ !')); $this->messages['cn'][1] = array('ERROR', _('Account %s:') . ' windowsGroup_cn', _('Group name contains invalid characters. Valid characters are: a-z, A-Z, 0-9 and .-_ !'));
$this->messages['mail'][0] = array('ERROR', _('Email address'), _('Please enter a valid email address!')); $this->messages['mail'][0] = array('ERROR', _('Email address'), _('Please enter a valid email address!'));
$this->messages['mail'][1] = array('ERROR', _('Account %s:') . ' windowsGroup_mail', _('Please enter a valid email address!')); $this->messages['mail'][1] = array('ERROR', _('Account %s:') . ' windowsGroup_mail', _('Please enter a valid email address!'));
$this->messages['otherMailbox'][0] = array('ERROR', _('Email alias'), _('Email alias is invalid!'));
$this->messages['otherMailbox'][1] = array('ERROR', _('Account %s:') . ' windowsGroup_otherMailbox', _('Email alias is invalid!'));
$this->messages['groupScope'][0] = array('ERROR', _('Account %s:') . ' windowsGroup_groupScope', _('Please enter a valid group scope.')); $this->messages['groupScope'][0] = array('ERROR', _('Account %s:') . ' windowsGroup_groupScope', _('Please enter a valid group scope.'));
$this->messages['groupType'][0] = array('ERROR', _('Account %s:') . ' windowsGroup_groupType', _('Please enter a valid group type.')); $this->messages['groupType'][0] = array('ERROR', _('Account %s:') . ' windowsGroup_groupType', _('Please enter a valid group type.'));
} }
@ -276,9 +253,6 @@ class windowsGroup extends baseModule {
if (!$this->isBooleanConfigOptionSet('windowsGroup_hidemail')) { if (!$this->isBooleanConfigOptionSet('windowsGroup_hidemail')) {
$this->addSimpleInputTextField($container, 'mail', _('Email address'), false); $this->addSimpleInputTextField($container, 'mail', _('Email address'), false);
} }
if (!$this->isBooleanConfigOptionSet('windowsGroup_hideotherMailbox')) {
$this->addMultiValueInputTextField($container, 'otherMailbox', _('Email alias'));
}
// group type // group type
$groupType = windowsGroup::TYPE_SECURITY; $groupType = windowsGroup::TYPE_SECURITY;
$groupScope = windowsGroup::SCOPE_GLOBAL; $groupScope = windowsGroup::SCOPE_GLOBAL;
@ -391,10 +365,6 @@ class windowsGroup extends baseModule {
$return[] = $this->messages['mail'][0]; $return[] = $this->messages['mail'][0];
} }
} }
// email aliases
if (!$this->isBooleanConfigOptionSet('windowsGroup_hideotherMailbox')) {
$this->processMultiValueInputTextField('otherMailbox', $return, 'email');
}
// group scope // group scope
switch ($_POST['groupScope']) { switch ($_POST['groupScope']) {
case windowsGroup::SCOPE_DOMAIN_LOCAL: case windowsGroup::SCOPE_DOMAIN_LOCAL:
@ -640,19 +610,6 @@ class windowsGroup extends baseModule {
$errors[] = $errMsg; $errors[] = $errMsg;
} }
} }
// email aliases
if (!$this->isBooleanConfigOptionSet('windowsGroup_hideotherMailbox') && isset($ids['windowsGroup_otherMailbox']) && ($rawAccounts[$i][$ids['windowsGroup_otherMailbox']] != "")) {
$valueList = preg_split('/;[ ]*/', $rawAccounts[$i][$ids['windowsGroup_otherMailbox']]);
$partialAccounts[$i]['otherMailbox'] = $valueList;
for ($x = 0; $x < sizeof($valueList); $x++) {
if (!get_preg($valueList[$x], 'email')) {
$errMsg = $this->messages['otherMailbox'][1];
array_push($errMsg, array($i));
$errors[] = $errMsg;
break;
}
}
}
// managed by // managed by
if (!$this->isBooleanConfigOptionSet('windowsGroup_hidemanagedBy') && $rawAccounts[$i][$ids['windowsGroup_managedBy']] != "") { if (!$this->isBooleanConfigOptionSet('windowsGroup_hidemanagedBy') && $rawAccounts[$i][$ids['windowsGroup_managedBy']] != "") {
$partialAccounts[$i]['managedBy'] = $rawAccounts[$i][$ids['windowsGroup_managedBy']]; $partialAccounts[$i]['managedBy'] = $rawAccounts[$i][$ids['windowsGroup_managedBy']];
@ -714,7 +671,6 @@ class windowsGroup extends baseModule {
$this->addSimplePDFField($return, 'description', _('Description')); $this->addSimplePDFField($return, 'description', _('Description'));
$this->addSimplePDFField($return, 'info', _('Notes')); $this->addSimplePDFField($return, 'info', _('Notes'));
$this->addSimplePDFField($return, 'mail', _('Email address')); $this->addSimplePDFField($return, 'mail', _('Email address'));
$this->addSimplePDFField($return, 'otherMailbox', _('Email alias'));
// group type // group type
$groupType = windowsGroup::TYPE_SECURITY; $groupType = windowsGroup::TYPE_SECURITY;
$groupScope = windowsGroup::SCOPE_GLOBAL; $groupScope = windowsGroup::SCOPE_GLOBAL;