translation update
This commit is contained in:
parent
c258ae9689
commit
41da55db27
|
@ -71,7 +71,7 @@ class authorizedServiceObject extends baseModule {
|
||||||
$return['help'] = array (
|
$return['help'] = array (
|
||||||
'authorizedService' => array (
|
'authorizedService' => array (
|
||||||
"Headline" => _("Authorized Services"),
|
"Headline" => _("Authorized Services"),
|
||||||
"Text" => _("Service name e.g. sshd, imap, ftp.... Enter one service per entry."). ' '. _("Use * for all services.")
|
"Text" => _("Service name (e.g. sshd, imap, ftp). Enter one service per entry."). ' '. _("Use * for all services.")
|
||||||
),
|
),
|
||||||
'authorizedServices' => array (
|
'authorizedServices' => array (
|
||||||
"Headline" => _("Authorized Services"),
|
"Headline" => _("Authorized Services"),
|
||||||
|
|
|
@ -64,7 +64,7 @@ class freeRadius extends baseModule {
|
||||||
// managed object classes
|
// managed object classes
|
||||||
$return['objectClasses'] = array('radiusprofile');
|
$return['objectClasses'] = array('radiusprofile');
|
||||||
// managed attributes
|
// managed attributes
|
||||||
$return['attributes'] = array('radiusFramedIPAddress', 'radiusFramedIPNetmask', 'radiusRealm');
|
$return['attributes'] = array('radiusFramedIPAddress', 'radiusFramedIPNetmask', 'radiusRealm', 'radiusGroupName', 'radiusExpiration', 'radiusIdleTimeout');
|
||||||
// help Entries
|
// help Entries
|
||||||
$return['help'] = array(
|
$return['help'] = array(
|
||||||
'radiusFramedIPAddress' => array(
|
'radiusFramedIPAddress' => array(
|
||||||
|
@ -79,6 +79,22 @@ class freeRadius extends baseModule {
|
||||||
"Headline" => _("Realm"),
|
"Headline" => _("Realm"),
|
||||||
"Text" => _("The Radius realm of this account.")
|
"Text" => _("The Radius realm of this account.")
|
||||||
),
|
),
|
||||||
|
'radiusGroupName' => array(
|
||||||
|
"Headline" => _("Group name(s)"),
|
||||||
|
"Text" => _("The group name(s) for this account.")
|
||||||
|
),
|
||||||
|
'radiusGroupNameList' => array(
|
||||||
|
"Headline" => _("Group name(s)"),
|
||||||
|
"Text" => _("The group name(s) for this account.") . ' ' . _("Multiple values are separated by semicolon.")
|
||||||
|
),
|
||||||
|
'radiusExpiration' => array(
|
||||||
|
"Headline" => _("Expiration date"),
|
||||||
|
"Text" => _("The account will be locked after this date.")
|
||||||
|
),
|
||||||
|
'radiusIdleTimeout' => array(
|
||||||
|
"Headline" => _("Idle timeout"),
|
||||||
|
"Text" => _("Specifies the maximum number of seconds that a connection can be idle before the session is terminated.")
|
||||||
|
),
|
||||||
'hiddenOptions' => array(
|
'hiddenOptions' => array(
|
||||||
"Headline" => _("Hidden options"),
|
"Headline" => _("Hidden options"),
|
||||||
"Text" => _("The selected options will not be managed inside LAM. You can use this to reduce the number of displayed input fields.")
|
"Text" => _("The selected options will not be managed inside LAM. You can use this to reduce the number of displayed input fields.")
|
||||||
|
@ -95,6 +111,12 @@ class freeRadius extends baseModule {
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('freeRadius_hideRadiusFramedIPNetmask', false, _('Net mask'), null, false));
|
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('freeRadius_hideRadiusFramedIPNetmask', false, _('Net mask'), null, false));
|
||||||
$configContainerOptions->addElement(new htmlOutputText(' '));
|
$configContainerOptions->addElement(new htmlOutputText(' '));
|
||||||
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('freeRadius_hideRadiusRealm', false, _('Realm'), null, false));
|
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('freeRadius_hideRadiusRealm', false, _('Realm'), null, false));
|
||||||
|
$configContainerOptions->addElement(new htmlOutputText(' '));
|
||||||
|
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('freeRadius_hideRadiusGroupName', false, _('Group name(s)'), null, false));
|
||||||
|
$configContainerOptions->addNewLine();
|
||||||
|
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('freeRadius_hideRadiusExpiration', false, _('Expiration date'), null, false));
|
||||||
|
$configContainerOptions->addElement(new htmlOutputText(' '));
|
||||||
|
$configContainerOptions->addElement(new htmlTableExtendedInputCheckbox('freeRadius_hideRadiusIdleTimeout', false, _('Idle timeout'), null, false));
|
||||||
$configContainer->addElement($configContainerOptions, true);
|
$configContainer->addElement($configContainerOptions, true);
|
||||||
$return['config_options']['all'] = $configContainer;
|
$return['config_options']['all'] = $configContainer;
|
||||||
// profile settings
|
// profile settings
|
||||||
|
@ -115,6 +137,17 @@ class freeRadius extends baseModule {
|
||||||
'error_message' => $this->messages['radiusRealm'][0]);
|
'error_message' => $this->messages['radiusRealm'][0]);
|
||||||
$return['profile_mappings']['freeRadius_radiusRealm'] = 'radiusRealm';
|
$return['profile_mappings']['freeRadius_radiusRealm'] = 'radiusRealm';
|
||||||
}
|
}
|
||||||
|
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusGroupName')) {
|
||||||
|
$profileElements[] = new htmlTableExtendedInputField(_('Group name(s)'), 'freeRadius_radiusGroupName', null, 'radiusGroupNameList');
|
||||||
|
}
|
||||||
|
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusIdleTimeout')) {
|
||||||
|
$profileElements[] = new htmlTableExtendedInputField(_('Idle timeout'), 'freeRadius_radiusIdleTimeout', null, 'radiusIdleTimeout');
|
||||||
|
$return['profile_checks']['freeRadius_radiusIdleTimeout'] = array(
|
||||||
|
'type' => 'ext_preg',
|
||||||
|
'regex' => 'digit',
|
||||||
|
'error_message' => $this->messages['radiusIdleTimeout'][0]);
|
||||||
|
$return['profile_mappings']['freeRadius_radiusIdleTimeout'] = 'radiusIdleTimeout';
|
||||||
|
}
|
||||||
if (sizeof($profileElements) > 0) {
|
if (sizeof($profileElements) > 0) {
|
||||||
$profileContainer = new htmlTable();
|
$profileContainer = new htmlTable();
|
||||||
for ($i = 0; $i < sizeof($profileElements); $i++) {
|
for ($i = 0; $i < sizeof($profileElements); $i++) {
|
||||||
|
@ -149,6 +182,30 @@ class freeRadius extends baseModule {
|
||||||
'example' => _('company.com')
|
'example' => _('company.com')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusGroupName')) {
|
||||||
|
$return['upload_columns'][] = array(
|
||||||
|
'name' => 'freeRadius_radiusGroupName',
|
||||||
|
'description' => _('Group name(s)'),
|
||||||
|
'help' => 'radiusGroupNameList',
|
||||||
|
'example' => _('group01;group02')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusExpiration')) {
|
||||||
|
$return['upload_columns'][] = array(
|
||||||
|
'name' => 'freeRadius_radiusExpiration',
|
||||||
|
'description' => _('Expiration date'),
|
||||||
|
'help' => 'radiusExpiration',
|
||||||
|
'example' => '17-07-2011 00:00'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusIdleTimeout')) {
|
||||||
|
$return['upload_columns'][] = array(
|
||||||
|
'name' => 'freeRadius_radiusIdleTimeout',
|
||||||
|
'description' => _('Idle timeout'),
|
||||||
|
'help' => 'radiusIdleTimeout',
|
||||||
|
'example' => '3600'
|
||||||
|
);
|
||||||
|
}
|
||||||
// available PDF fields
|
// available PDF fields
|
||||||
$return['PDF_fields'] = array();
|
$return['PDF_fields'] = array();
|
||||||
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusFramedIPAddress')) {
|
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusFramedIPAddress')) {
|
||||||
|
@ -160,6 +217,15 @@ class freeRadius extends baseModule {
|
||||||
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusRealm')) {
|
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusRealm')) {
|
||||||
$return['PDF_fields']['radiusRealm'] = _('Realm');
|
$return['PDF_fields']['radiusRealm'] = _('Realm');
|
||||||
}
|
}
|
||||||
|
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusGroupName')) {
|
||||||
|
$return['PDF_fields']['radiusGroupName'] = _('Group name(s)');
|
||||||
|
}
|
||||||
|
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusExpiration')) {
|
||||||
|
$return['PDF_fields']['radiusExpiration'] = _('Expiration date');
|
||||||
|
}
|
||||||
|
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusIdleTimeout')) {
|
||||||
|
$return['PDF_fields']['radiusIdleTimeout'] = _('Idle timeout');
|
||||||
|
}
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,6 +239,12 @@ class freeRadius extends baseModule {
|
||||||
$this->messages['radiusFramedIPNetmask'][1] = array('ERROR', _('Account %s:') . ' freeRadius_radiusFramedIPNetmask', _('The net mask is invalid.'));
|
$this->messages['radiusFramedIPNetmask'][1] = array('ERROR', _('Account %s:') . ' freeRadius_radiusFramedIPNetmask', _('The net mask is invalid.'));
|
||||||
$this->messages['radiusRealm'][0] = array('ERROR', _('Please enter a valid realm.'));
|
$this->messages['radiusRealm'][0] = array('ERROR', _('Please enter a valid realm.'));
|
||||||
$this->messages['radiusRealm'][1] = array('ERROR', _('Account %s:') . ' freeRadius_radiusRealm', _('Please enter a valid realm.'));
|
$this->messages['radiusRealm'][1] = array('ERROR', _('Account %s:') . ' freeRadius_radiusRealm', _('Please enter a valid realm.'));
|
||||||
|
$this->messages['radiusGroupName'][0] = array('ERROR', _('Please enter a valid list of group names.'));
|
||||||
|
$this->messages['radiusGroupName'][1] = array('ERROR', _('Account %s:') . ' freeRadius_radiusGroupName', _('Please enter a valid list of group names.'));
|
||||||
|
$this->messages['radiusExpiration'][0] = array('ERROR', _('The expiration date must be in format DD-MM-YYYY HH:MM.'));
|
||||||
|
$this->messages['radiusExpiration'][1] = array('ERROR', _('Account %s:') . ' freeRadius_radiusExpiration', _('The expiration date must be in format DD-MM-YYYY HH:MM.'));
|
||||||
|
$this->messages['radiusIdleTimeout'][0] = array('ERROR', _('Please enter a numeric value for the idle timeout.'));
|
||||||
|
$this->messages['radiusIdleTimeout'][1] = array('ERROR', _('Account %s:') . ' freeRadius_radiusIdleTimeout', _('Please enter a numeric value for the idle timeout.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -207,6 +279,31 @@ class freeRadius extends baseModule {
|
||||||
}
|
}
|
||||||
$return->addElement(new htmlTableExtendedInputField(_('Realm'), 'radiusRealm', $radiusRealm, 'radiusRealm'), true);
|
$return->addElement(new htmlTableExtendedInputField(_('Realm'), 'radiusRealm', $radiusRealm, 'radiusRealm'), true);
|
||||||
}
|
}
|
||||||
|
// group names
|
||||||
|
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusGroupName')) {
|
||||||
|
|
||||||
|
}
|
||||||
|
// expiration date
|
||||||
|
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusExpiration')) {
|
||||||
|
$radiusExpiration = ' -';
|
||||||
|
if (isset($this->attributes['radiusExpiration'][0])) {
|
||||||
|
$radiusExpiration = $this->formatExpirationDate($this->attributes['radiusExpiration'][0]);
|
||||||
|
}
|
||||||
|
$return->addElement(new htmlOutputText('Expiration date'));
|
||||||
|
$radiusExpirationList = new htmlGroup();
|
||||||
|
$radiusExpirationList->addElement(new htmlOutputText($radiusExpiration . ' ', false));
|
||||||
|
$radiusExpirationList->addElement(new htmlAccountPageButton(get_class($this), 'expiration', 'change', _('Change')));
|
||||||
|
$return->addElement($radiusExpirationList);
|
||||||
|
$return->addElement(new htmlHelpLink('radiusExpiration'), true);
|
||||||
|
}
|
||||||
|
// idle timeout
|
||||||
|
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusIdleTimeout')) {
|
||||||
|
$radiusIdleTimeout = '';
|
||||||
|
if (isset($this->attributes['radiusIdleTimeout'][0])) {
|
||||||
|
$radiusIdleTimeout = $this->attributes['radiusIdleTimeout'][0];
|
||||||
|
}
|
||||||
|
$return->addElement(new htmlTableExtendedInputField(_('Idle timeout'), 'radiusIdleTimeout', $radiusIdleTimeout, 'radiusIdleTimeout'), true);
|
||||||
|
}
|
||||||
// button to remove extension
|
// button to remove extension
|
||||||
$return->addElement(new htmlSpacer(null, '10px'), true);
|
$return->addElement(new htmlSpacer(null, '10px'), true);
|
||||||
$remButton = new htmlButton('remObjectClass', _('Remove FreeRadius extension'));
|
$remButton = new htmlButton('remObjectClass', _('Remove FreeRadius extension'));
|
||||||
|
@ -338,6 +435,51 @@ class freeRadius extends baseModule {
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks input values of account profiles.
|
||||||
|
*
|
||||||
|
* @param array $options a hash array (name => value) containing the options
|
||||||
|
* @return array list of error messages (array(type, title, text)) to generate StatusMessages, if any
|
||||||
|
*/
|
||||||
|
function check_profileOptions($options) {
|
||||||
|
$messages = parent::check_profileOptions($options);
|
||||||
|
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusGroupName')) {
|
||||||
|
$list = preg_split('/;[ ]*/', $options['freeRadius_radiusGroupName'][0]);
|
||||||
|
for ($i = 0; $i < sizeof($list); $i++) {
|
||||||
|
if (!get_preg($list[$i], 'groupname')) {
|
||||||
|
$messages[] = $this->messages['radiusGroupName'][0];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $messages;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads the values of an account profile into internal variables.
|
||||||
|
*
|
||||||
|
* @param array $profile hash array with profile values (identifier => value)
|
||||||
|
*/
|
||||||
|
function load_profile($profile) {
|
||||||
|
// profile mappings in meta data
|
||||||
|
parent::load_profile($profile);
|
||||||
|
if (!$this->isBooleanConfigOptionSet('freeRadius_hideRadiusGroupName')) {
|
||||||
|
// group name(s)
|
||||||
|
if (isset($profile['freeRadius_radiusGroupName'][0]) && $profile['freeRadius_radiusGroupName'][0] != '') {
|
||||||
|
$this->attributes['radiusGroupName'] = preg_split('/;[ ]*/', $profile['freeRadius_radiusGroupName'][0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Formats the expiration date attribute.
|
||||||
|
*
|
||||||
|
* @param String $date date value
|
||||||
|
*/
|
||||||
|
private function formatExpirationDate($date) {
|
||||||
|
return $date;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1672,7 +1672,7 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
$groups = explode(",", $rawAccounts[$i][$ids['posixAccount_gon']]);
|
$groups = explode(",", $rawAccounts[$i][$ids['posixAccount_gon']]);
|
||||||
for ($g = 0; $g < sizeof($groups); $g++) {
|
for ($g = 0; $g < sizeof($groups); $g++) {
|
||||||
if (!in_array($groups[$g], $gonList)) {
|
if (!in_array($groups[$g], $gonList)) {
|
||||||
$errors[] = array('ERROR', _('Unable to find group of names in LDAP.'), $groups[$g]);
|
$errors[] = array('ERROR', _('Unable to find group in LDAP.'), $groups[$g]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1971,7 +1971,7 @@ class posixAccount extends baseModule implements passwordService {
|
||||||
if (!$success) {
|
if (!$success) {
|
||||||
$errors[] = array(
|
$errors[] = array(
|
||||||
"ERROR",
|
"ERROR",
|
||||||
_("LAM was unable to modify group memberships for group of names: %s"),
|
_("LAM was unable to modify group memberships for group: %s"),
|
||||||
ldap_errno($_SESSION['ldap']->server()) . ": " . ldap_error($_SESSION['ldap']->server()),
|
ldap_errno($_SESSION['ldap']->server()) . ": " . ldap_error($_SESSION['ldap']->server()),
|
||||||
array($temp['groups'][$temp['counter']])
|
array($temp['groups'][$temp['counter']])
|
||||||
);
|
);
|
||||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -35,7 +35,7 @@ if (! $request['container']) {
|
||||||
if (! count($request['template']->getRDNAttrs()))
|
if (! count($request['template']->getRDNAttrs()))
|
||||||
error(_('The were no attributes marked as an RDN attribute.'),'error','index.php');
|
error(_('The were no attributes marked as an RDN attribute.'),'error','index.php');
|
||||||
if (! $request['template']->getRDN())
|
if (! $request['template']->getRDN())
|
||||||
error(_('The RDN field is empty?'),'error','index.php');
|
error(_('The RDN field is empty.'),'error','index.php');
|
||||||
|
|
||||||
# Some other attribute checking...
|
# Some other attribute checking...
|
||||||
foreach ($request['template']->getAttributes() as $attribute) {
|
foreach ($request['template']->getAttributes() as $attribute) {
|
||||||
|
|
Loading…
Reference in New Issue