diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc
index dc1e41c3..4165eee7 100644
--- a/lam/lib/modules/sambaSamAccount.inc
+++ b/lam/lib/modules/sambaSamAccount.inc
@@ -169,14 +169,14 @@ class sambaSamAccount extends baseModule {
);
// available PDF fields
$return['PDF_fields'] = array(
- 'displayName',
- 'sambaHomePath',
- 'sambaHomeDrive',
- 'sambaLogonScript',
- 'sambaProfilePath',
- 'sambaUserWorkstations',
- 'sambaDomainName',
- 'sambaPrimaryGroupSID'
+ 'displayName', 'sambaHomePath', 'sambaHomeDrive',
+ 'sambaLogonScript', 'sambaProfilePath', 'sambaUserWorkstations',
+ 'sambaDomainName', 'sambaPrimaryGroupSID', 'tsAllowLogin',
+ 'tsHomeDir', 'tsHomeDrive', 'tsProfilePath',
+ 'tsInherit', 'tsInitialProgram', 'tsWorkDirectory',
+ 'tsConnectionLimit', 'tsDisconnectionLimit', 'tsIdleLimit',
+ 'tsConnectDrives', 'tsConnectPrinters', 'tsClientPrinterDefault',
+ 'tsShadowing', 'tsBrokenConn', 'tsReconnect'
);
$return['selfServiceFieldSettings'] = array(
'syncNTPassword' => _('Sync Samba NT password with Unix password'),
@@ -866,7 +866,7 @@ class sambaSamAccount extends baseModule {
if (isset($this->attributes['sambaMungedDial'][0])) {
$mDial->load($this->attributes['sambaMungedDial'][0]);
}
- $mDial->setTsLogin(isset($_POST['tsAllowLogin']));
+ $mDial->setTsLogin(!isset($_POST['tsAllowLogin']));
$mDial->ctx['CtxWFHomeDir'] = $_POST['tsHomeDir'];
$mDial->ctx['CtxWFHomeDirDrive'] = $_POST['tsHomeDrive'];
$mDial->ctx['CtxWFProfilePath'] = $_POST['tsProfilePath'];
@@ -1640,6 +1640,71 @@ class sambaSamAccount extends baseModule {
if (isset($this->attributes['sambaPrimaryGroupSID'][0])) {
$return['sambaSamAccount_sambaPrimaryGroupSID'] = array('' . _('Windows group') . '' . $this->attributes['sambaPrimaryGroupSID'][0] . '');
}
+ // terminal server options
+ if (isset($this->attributes['sambaMungedDial'][0])) {
+ $mDial = new sambaMungedDial();
+ $mDial->load($this->attributes['sambaMungedDial'][0]);
+ $tsAllowLogin = _('yes');
+ if (!$mDial->getTsLogin()) {
+ $tsAllowLogin = _('no');
+ }
+ $return['sambaSamAccount_tsAllowLogin'] = array('' . _('Allow terminal server login') . '' . $tsAllowLogin . '');
+ $return['sambaSamAccount_tsHomeDir'] = array('' . _('Home directory') . '' . $mDial->ctx['CtxWFHomeDir'] . '');
+ $return['sambaSamAccount_tsHomeDrive'] = array('' . _('Home drive') . '' . $mDial->ctx['CtxWFHomeDirDrive'] . '');
+ $return['sambaSamAccount_tsProfilePath'] = array('' . _('Profile path') . '' . $mDial->ctx['CtxWFProfilePath'] . '');
+ $tsInherit = _('yes');
+ if (!$mDial->getInheritMode()) {
+ $tsInherit = _('no');
+ }
+ $return['sambaSamAccount_tsInherit'] = array('' . _('Inherit client startup configuration') . '' . $tsInherit . '');
+ $return['sambaSamAccount_tsInitialProgram'] = array('' . _('Initial program') . '' . $mDial->ctx['CtxInitialProgram'] . '');
+ $return['sambaSamAccount_tsWorkDirectory'] = array('' . _('Working directory') . '' . $mDial->ctx['CtxWorkDirectory'] . '');
+ $return['sambaSamAccount_tsConnectionLimit'] = array('' . _('Connection time limit') . '' . $mDial->ctx['CtxMaxConnectionTime'] . '');
+ $return['sambaSamAccount_tsDisconnectionLimit'] = array('' . _('Disconnection time limit') . '' . $mDial->ctx['CtxMaxDisconnectionTime'] . '');
+ $return['sambaSamAccount_tsIdleLimit'] = array('' . _('Idle time limit') . '' . $mDial->ctx['CtxMaxIdleTime'] . '');
+ $tsConnectDrives = _('yes');
+ if (!$mDial->getConnectClientDrives()) {
+ $tsConnectDrives = _('no');
+ }
+ $return['sambaSamAccount_tsConnectDrives'] = array('' . _('Connect client drives') . '' . $tsConnectDrives . '');
+ $tsConnectPrinters = _('yes');
+ if (!$mDial->getConnectClientPrinters()) {
+ $tsConnectPrinters = _('no');
+ }
+ $return['sambaSamAccount_tsConnectPrinters'] = array('' . _('Connect client printers') . '' . $tsConnectPrinters . '');
+ $tsClientPrinterDefault = _('yes');
+ if (!$mDial->getDefaultPrinter()) {
+ $tsClientPrinterDefault = _('no');
+ }
+ $return['sambaSamAccount_tsClientPrinterDefault'] = array('' . _('Client printer is default') . '' . $tsClientPrinterDefault . '');
+ $shadowOptions = array(
+ '0' => _("disabled"),
+ '1' => _("input on, notify on"),
+ '2' => _("input on, notify off"),
+ '3' => _("input off, notify on"),
+ '4' => _("input off, nofify off"));
+ $tsShadowing = '';
+ if (($mDial->getShadow() != null) && is_numeric($mDial->getShadow())) {
+ $tsShadowing = $shadowOptions[$mDial->getShadow()];
+ }
+ $return['sambaSamAccount_tsShadowing'] = array('' . _('Shadowing') . '' . $tsShadowing . '');
+ $brokenConnOptions = array(
+ '0' => _("disconnect"),
+ '1' => _("reset"));
+ $tsBrokenConn = '';
+ if (($mDial->getBrokenConn() != null) && is_numeric($mDial->getBrokenConn())) {
+ $tsBrokenConn = $brokenConnOptions[$mDial->getBrokenConn()];
+ }
+ $return['sambaSamAccount_tsBrokenConn'] = array('' . _('On broken or timed out connection') . '' . $tsBrokenConn . '');
+ $reconnectOptions = array(
+ '0' => _("from any client"),
+ '1' => _("from previous client only"));
+ $tsReconnect = '';
+ if (($mDial->getReConn() != null) && is_numeric($mDial->getReConn())) {
+ $tsReconnect = $reconnectOptions[$mDial->getReConn()];
+ }
+ $return['sambaSamAccount_tsReconnect'] = array('' . _('Reconnect if disconnected') . '' . $tsReconnect . '');
+ }
return $return;
}