diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-25 23:28:10 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-25 23:28:10 -0600 |
commit | aea462f777680f3dd68968a32b309aa069b75a98 (patch) | |
tree | c453a883e48e19ffc238fb46a6599c62fa3470d6 /clients/tde | |
parent | be64ff0e7e45df0fcf594951d5297e1bee95339e (diff) | |
download | ulab-aea462f777680f3dd68968a32b309aa069b75a98.tar.gz ulab-aea462f777680f3dd68968a32b309aa069b75a98.zip |
Add ability to set maximum terminal service users in group
Diffstat (limited to 'clients/tde')
-rw-r--r-- | clients/tde/src/part/adminusermgmt/groupauthdlg.cpp | 17 | ||||
-rw-r--r-- | clients/tde/src/part/adminusermgmt/groupauthdlg.h | 2 | ||||
-rw-r--r-- | clients/tde/src/part/adminusermgmt/groupauthdlgbase.ui | 24 | ||||
-rw-r--r-- | clients/tde/src/part/adminusermgmt/layout.ui | 11 | ||||
-rw-r--r-- | clients/tde/src/part/adminusermgmt/part.cpp | 7 |
5 files changed, 60 insertions, 1 deletions
diff --git a/clients/tde/src/part/adminusermgmt/groupauthdlg.cpp b/clients/tde/src/part/adminusermgmt/groupauthdlg.cpp index 3633332..7832b10 100644 --- a/clients/tde/src/part/adminusermgmt/groupauthdlg.cpp +++ b/clients/tde/src/part/adminusermgmt/groupauthdlg.cpp @@ -129,6 +129,23 @@ TQKeyedStringList GroupPermissionsDialog::selectedServers() { return list; } +void GroupPermissionsDialog::setSessionLimit(int limit, bool visible) { + if (visible) { + m_base->m_sessionLimitLabel->show(); + m_base->m_sessionLimit->show(); + } + else { + m_base->m_sessionLimitLabel->hide(); + m_base->m_sessionLimit->hide(); + } + + m_base->m_sessionLimit->setValue(limit); +} + +int GroupPermissionsDialog::sessionLimit() { + return m_base->m_sessionLimit->value(); +} + void GroupPermissionsDialog::slotOk() { accept(); } diff --git a/clients/tde/src/part/adminusermgmt/groupauthdlg.h b/clients/tde/src/part/adminusermgmt/groupauthdlg.h index 3290c7f..1c3498d 100644 --- a/clients/tde/src/part/adminusermgmt/groupauthdlg.h +++ b/clients/tde/src/part/adminusermgmt/groupauthdlg.h @@ -59,6 +59,8 @@ class GroupPermissionsDialog : public KDialogBase void setAvailableServers(TQKeyedStringList list); void setSelectedServers(TQKeyedStringList list); TQKeyedStringList selectedServers(); + void setSessionLimit(int limit, bool visible); + int sessionLimit(); public slots: void slotOk(); diff --git a/clients/tde/src/part/adminusermgmt/groupauthdlgbase.ui b/clients/tde/src/part/adminusermgmt/groupauthdlgbase.ui index ced61a0..cf28002 100644 --- a/clients/tde/src/part/adminusermgmt/groupauthdlgbase.ui +++ b/clients/tde/src/part/adminusermgmt/groupauthdlgbase.ui @@ -41,7 +41,29 @@ <string></string> </property> </widget> - <widget class="TQGroupBox" row="1" column="0" colspan="2"> + <widget class="TQLabel" row="1" column="0" colspan="0"> + <property name="name"> + <cstring>m_sessionLimitLabel</cstring> + </property> + <property name="text"> + <string>Maximum Simultaneous Users:</string> + </property> + </widget> + <widget class="KIntNumInput" row="1" column="1" colspan="0"> + <property name="name"> + <cstring>m_sessionLimit</cstring> + </property> + <property name="minValue"> + <int>0</int> + </property> + <property name="maxValue"> + <int>65535</int> + </property> + <property name="value"> + <int>0</int> + </property> + </widget> + <widget class="TQGroupBox" row="2" column="0" colspan="2"> <property name="name"> <cstring>groupPermissionsSelector</cstring> </property> diff --git a/clients/tde/src/part/adminusermgmt/layout.ui b/clients/tde/src/part/adminusermgmt/layout.ui index bc11742..104134a 100644 --- a/clients/tde/src/part/adminusermgmt/layout.ui +++ b/clients/tde/src/part/adminusermgmt/layout.ui @@ -57,6 +57,17 @@ <bool>true</bool> </property> </column> + <column> + <property name="text"> + <string>Maximum Simultaneous Users</string> + </property> + <property name="clickable"> + <bool>true</bool> + </property> + <property name="resizeable"> + <bool>true</bool> + </property> + </column> <property name="name"> <cstring>ts_list</cstring> </property> diff --git a/clients/tde/src/part/adminusermgmt/part.cpp b/clients/tde/src/part/adminusermgmt/part.cpp index 98a97ab..37b0b4d 100644 --- a/clients/tde/src/part/adminusermgmt/part.cpp +++ b/clients/tde/src/part/adminusermgmt/part.cpp @@ -240,6 +240,7 @@ void UserManagementPart::terminalServiceAddGroupButtonClicked() { keyedServerList.append(TQKeyedStringPair(TQString("%1").arg(*it2), 0)); } groupauthdlg.setAvailableServers(keyedServerList); + groupauthdlg.setSessionLimit(0, true); } if (groupauthdlg.exec() == TQDialog::Accepted) { m_updateTerminalServiceAuthGroupList.clear(); @@ -251,6 +252,7 @@ void UserManagementPart::terminalServiceAddGroupButtonClicked() { for (TQKeyedStringList::Iterator it = selectedServers.begin(); it != selectedServers.end(); ++it) { agt.allowedServerNames.append((*it).first); } + agt.maximumActiveSessionCount = groupauthdlg.sessionLimit(); m_updateTerminalServiceAuthGroupList.append(agt); m_commHandlerNextState = ModeUpdate_TerminalServices; m_commHandlerNextMode = ModeUpdate; @@ -278,6 +280,7 @@ void UserManagementPart::terminalServiceModifyGroupButtonClicked() { keyedServerList.append(TQKeyedStringPair(TQString("%1").arg(*it2), 0)); } groupauthdlg.setSelectedServers(keyedServerList); + groupauthdlg.setSessionLimit((*it).maximumActiveSessionCount, true); } groupauthdlg.setGroupName(item->text(0), false); if (groupauthdlg.exec() == TQDialog::Accepted) { @@ -289,6 +292,7 @@ void UserManagementPart::terminalServiceModifyGroupButtonClicked() { for (TQKeyedStringList::Iterator it = selectedServers.begin(); it != selectedServers.end(); ++it) { agt.allowedServerNames.append((*it).first); } + agt.maximumActiveSessionCount = groupauthdlg.sessionLimit(); m_updateTerminalServiceAuthGroupList.append(agt); m_commHandlerNextState = ModeUpdate_TerminalServices; m_commHandlerNextMode = ModeUpdate; @@ -315,6 +319,7 @@ void UserManagementPart::terminalServiceDeleteGroupButtonClicked() { void UserManagementPart::workspaceAddGroupButtonClicked() { GroupPermissionsDialog groupauthdlg(0); groupauthdlg.setPermissionsSelectorLabel(i18n("Allowed Stations")); + groupauthdlg.setSessionLimit(-1, false); { TQKeyedStringList friendlyStations; for (StationList::iterator it = m_availableWorkspaceStationsList.begin(); it != m_availableWorkspaceStationsList.end(); ++it) { @@ -344,6 +349,7 @@ void UserManagementPart::workspaceModifyGroupButtonClicked() { GroupPermissionsDialog groupauthdlg(0); groupauthdlg.setPermissionsSelectorLabel(i18n("Allowed Stations")); + groupauthdlg.setSessionLimit(-1, false); { TQKeyedStringList friendlyStations; for (StationList::iterator it = m_availableWorkspaceStationsList.begin(); it != m_availableWorkspaceStationsList.end(); ++it) { @@ -633,6 +639,7 @@ void UserManagementPart::mainEventLoop() { } item->setText(0, TQString("%1").arg(info.groupName)); item->setText(1, info.allowedServerNames.join(", ")); + item->setText(2, TQString("%1").arg(info.maximumActiveSessionCount)); } it2 = TQListViewItemIterator(m_base->ts_list); while (it2.current()) { |