sync with Kerberos
This commit is contained in:
parent
a8e0c7d8b0
commit
29cf39ee4d
|
@ -438,7 +438,7 @@ class sambaSamAccount extends baseModule implements passwordService {
|
|||
'description' => _('Account expiration date'),
|
||||
'help' => 'expireDate',
|
||||
'default' => '31-12-2030',
|
||||
'example' => '15-10-2006'
|
||||
'example' => '15-10-2020'
|
||||
),
|
||||
array(
|
||||
'name' => 'sambaSamAccount_group',
|
||||
|
@ -978,18 +978,28 @@ class sambaSamAccount extends baseModule implements passwordService {
|
|||
if (strpos($buttonName, '_change') !== false) {
|
||||
// set new time
|
||||
$this->setExpirationDate($_POST['expire_yea'], $_POST['expire_mon'], $_POST['expire_day']);
|
||||
// sync other modules
|
||||
if (isset($_POST['syncShadow']) && ($_POST['syncShadow'] == 'on')) {
|
||||
$this->getAccountContainer()->getAccountModule('shadowAccount')->setExpirationDate(
|
||||
$_POST['expire_yea'], $_POST['expire_mon'], $_POST['expire_day']);
|
||||
}
|
||||
if (isset($_POST['syncHeimdal']) && ($_POST['syncHeimdal'] == 'on')) {
|
||||
$this->getAccountContainer()->getAccountModule('heimdalKerberos')->setExpirationDate(
|
||||
$_POST['expire_yea'], $_POST['expire_mon'], $_POST['expire_day']);
|
||||
}
|
||||
}
|
||||
elseif (strpos($buttonName, '_del') !== false) {
|
||||
// remove attribute value
|
||||
unset($this->attributes[$attr]);
|
||||
// sync other modules
|
||||
if (isset($_POST['syncShadow']) && ($_POST['syncShadow'] == 'on')) {
|
||||
$this->getAccountContainer()->getAccountModule('shadowAccount')->setExpirationDate(
|
||||
null, null, null);
|
||||
}
|
||||
if (isset($_POST['syncHeimdal']) && ($_POST['syncHeimdal'] == 'on')) {
|
||||
$this->getAccountContainer()->getAccountModule('heimdalKerberos')->setExpirationDate(
|
||||
null, null, null);
|
||||
}
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
@ -1389,6 +1399,9 @@ class sambaSamAccount extends baseModule implements passwordService {
|
|||
if ($this->getAccountContainer()->getAccountModule('shadowAccount') != null) {
|
||||
$return->addElement(new htmlTableExtendedInputCheckbox('syncShadow', false, _('Set also for Shadow')), true);
|
||||
}
|
||||
if ($this->getAccountContainer()->getAccountModule('heimdalKerberos') != null) {
|
||||
$return->addElement(new htmlTableExtendedInputCheckbox('syncHeimdal', false, _('Set also for Kerberos')), true);
|
||||
}
|
||||
$return->addElement(new htmlSpacer(null, '10px'), true);
|
||||
$buttons = new htmlTable();
|
||||
$buttons->addElement(new htmlAccountPageButton(get_class($this), 'attributes', 'change' . $attr, _('Change')));
|
||||
|
|
|
@ -382,18 +382,28 @@ class shadowAccount extends baseModule implements passwordService {
|
|||
// set expiration date
|
||||
if (isset($_POST['form_subpage_shadowAccount_attributes_change'])) {
|
||||
$this->setExpirationDate($_POST['shadowExpire_yea'], $_POST['shadowExpire_mon'], $_POST['shadowExpire_day']);
|
||||
// sync other modules
|
||||
if (isset($_POST['syncSamba']) && ($_POST['syncSamba'] == 'on')) {
|
||||
$this->getAccountContainer()->getAccountModule('sambaSamAccount')->setExpirationDate(
|
||||
$_POST['shadowExpire_yea'], $_POST['shadowExpire_mon'], $_POST['shadowExpire_day']);
|
||||
}
|
||||
if (isset($_POST['syncHeimdal']) && ($_POST['syncHeimdal'] == 'on')) {
|
||||
$this->getAccountContainer()->getAccountModule('heimdalKerberos')->setExpirationDate(
|
||||
$_POST['shadowExpire_yea'], $_POST['shadowExpire_mon'], $_POST['shadowExpire_day']);
|
||||
}
|
||||
}
|
||||
// remove expiration date
|
||||
elseif (isset($_POST['form_subpage_shadowAccount_attributes_del'])) {
|
||||
unset($this->attributes['shadowExpire']);
|
||||
// sync other modules
|
||||
if (isset($_POST['syncSamba']) && ($_POST['syncSamba'] == 'on')) {
|
||||
$this->getAccountContainer()->getAccountModule('sambaSamAccount')->setExpirationDate(
|
||||
null, null, null);
|
||||
}
|
||||
if (isset($_POST['syncHeimdal']) && ($_POST['syncHeimdal'] == 'on')) {
|
||||
$this->getAccountContainer()->getAccountModule('heimdalKerberos')->setExpirationDate(
|
||||
null, null, null);
|
||||
}
|
||||
}
|
||||
return $errors;
|
||||
}
|
||||
|
@ -423,6 +433,9 @@ class shadowAccount extends baseModule implements passwordService {
|
|||
if ($this->getAccountContainer()->getAccountModule('sambaSamAccount') != null) {
|
||||
$return->addElement(new htmlTableExtendedInputCheckbox('syncSamba', false, _('Set also for Samba 3')), true);
|
||||
}
|
||||
if ($this->getAccountContainer()->getAccountModule('heimdalKerberos') != null) {
|
||||
$return->addElement(new htmlTableExtendedInputCheckbox('syncHeimdal', false, _('Set also for Kerberos')), true);
|
||||
}
|
||||
$return->addElement(new htmlSpacer(null, '10px'), true);
|
||||
$buttonTable = new htmlTable();
|
||||
$buttonTable->addElement(new htmlAccountPageButton('shadowAccount', 'attributes', 'change', _('Change')));
|
||||
|
|
Loading…
Reference in New Issue