summaryrefslogtreecommitdiffstats
path: root/clients/tde/src
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 12:05:29 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-24 12:05:29 -0600
commit61dfcc04f73e45082f51945a7b98b7838da56da8 (patch)
tree31ba95662c5972ef74abc64e4404e7e20e2f498e /clients/tde/src
parent941d8c3b969eae32b0945987f1d849930736f5bb (diff)
downloadulab-61dfcc04f73e45082f51945a7b98b7838da56da8.tar.gz
ulab-61dfcc04f73e45082f51945a7b98b7838da56da8.zip
User management console now functional
Diffstat (limited to 'clients/tde/src')
-rw-r--r--clients/tde/src/part/adminusermgmt/Makefile.am10
-rw-r--r--clients/tde/src/part/adminusermgmt/layout.ui160
-rw-r--r--clients/tde/src/part/adminusermgmt/part.cpp463
-rw-r--r--clients/tde/src/part/adminusermgmt/part.h22
-rw-r--r--clients/tde/src/part/adminusermgmt/terminatedlg.cpp107
-rw-r--r--clients/tde/src/part/adminusermgmt/terminatedlg.h56
-rw-r--r--clients/tde/src/part/adminusermgmt/terminatedlgbase.ui43
7 files changed, 533 insertions, 328 deletions
diff --git a/clients/tde/src/part/adminusermgmt/Makefile.am b/clients/tde/src/part/adminusermgmt/Makefile.am
index 9db32f5..21dfe99 100644
--- a/clients/tde/src/part/adminusermgmt/Makefile.am
+++ b/clients/tde/src/part/adminusermgmt/Makefile.am
@@ -2,10 +2,10 @@ INCLUDES = $(all_includes) -I$(top_srcdir)/src -I$(top_srcdir)/src/widgets $
KDE_CXXFLAGS = $(USE_EXCEPTIONS)
METASOURCES = AUTO
-KDE_ICON = libremotelab_adminconsole
+KDE_ICON = libremotelab_adminusermgmt
# Part
-kde_module_LTLIBRARIES = libremotelab_adminconsole.la
-libremotelab_adminconsole_la_LIBADD = ../../widgets/libtracewidget.la ../../widgets/libfloatspinbox.la $(LIB_KFILE) $(LIB_KPARTS) $(LIB_TDEUI) $(LIB_QT) -ltdekrbsocket -ltqtrla
-libremotelab_adminconsole_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) $(LIB_TDECORE) $(LIB_TDEUI) -lkio -ltdefx
-libremotelab_adminconsole_la_SOURCES = part.cpp layout.ui terminatedlg.cpp terminatedlgbase.ui
+kde_module_LTLIBRARIES = libremotelab_adminusermgmt.la
+libremotelab_adminusermgmt_la_LIBADD = ../../widgets/libtracewidget.la ../../widgets/libfloatspinbox.la $(LIB_KFILE) $(LIB_KPARTS) $(LIB_TDEUI) $(LIB_QT) -ltdekrbsocket -ltqtrla
+libremotelab_adminusermgmt_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) $(LIB_TDECORE) $(LIB_TDEUI) -lkio -ltdefx
+libremotelab_adminusermgmt_la_SOURCES = part.cpp layout.ui terminatedlg.cpp terminatedlgbase.ui
diff --git a/clients/tde/src/part/adminusermgmt/layout.ui b/clients/tde/src/part/adminusermgmt/layout.ui
index 5a56809..bc11742 100644
--- a/clients/tde/src/part/adminusermgmt/layout.ui
+++ b/clients/tde/src/part/adminusermgmt/layout.ui
@@ -1,8 +1,8 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
- <class>AdminConsoleBase</class>
+ <class>UserManagementBase</class>
<widget class="TQWidget">
<property name="name">
- <cstring>AdminConsoleBase</cstring>
+ <cstring>UserManagementBase</cstring>
</property>
<property name="geometry">
<rect>
@@ -37,7 +37,7 @@
<widget class="KListView" row="1" column="0" colspan="4">
<column>
<property name="text">
- <string>Session ID</string>
+ <string>Group Name</string>
</property>
<property name="clickable">
<bool>true</bool>
@@ -48,73 +48,7 @@
</column>
<column>
<property name="text">
- <string>User Name</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Server Name</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Control PID</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Window Manager PID</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>X11 Display Number</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Logon Date</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Last Session Management Activity</string>
+ <string>Allowed Servers</string>
</property>
<property name="clickable">
<bool>true</bool>
@@ -148,10 +82,26 @@
</property>
<widget class="TQPushButton" row="0" column="0" colspan="1">
<property name="name">
- <cstring>ts_buttonKill</cstring>
+ <cstring>ts_buttonAddGroup</cstring>
+ </property>
+ <property name="text">
+ <string>Add Group</string>
+ </property>
+ </widget>
+ <widget class="TQPushButton" row="0" column="1" colspan="1">
+ <property name="name">
+ <cstring>ts_buttonModifyGroup</cstring>
</property>
<property name="text">
- <string>Terminate Session</string>
+ <string>Modify Group</string>
+ </property>
+ </widget>
+ <widget class="TQPushButton" row="0" column="2" colspan="1">
+ <property name="name">
+ <cstring>ts_buttonDeleteGroup</cstring>
+ </property>
+ <property name="text">
+ <string>Delete Group</string>
</property>
</widget>
</grid>
@@ -199,29 +149,7 @@
<widget class="KListView" row="1" column="0" colspan="4">
<column>
<property name="text">
- <string>Session ID</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>User Name</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Realm Name</string>
+ <string>Group Name</string>
</property>
<property name="clickable">
<bool>true</bool>
@@ -232,29 +160,7 @@
</column>
<column>
<property name="text">
- <string>Server ID</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Logon Date</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <column>
- <property name="text">
- <string>Forced Logoff Date</string>
+ <string>Allowed Stations</string>
</property>
<property name="clickable">
<bool>true</bool>
@@ -288,18 +194,26 @@
</property>
<widget class="TQPushButton" row="0" column="0" colspan="1">
<property name="name">
- <cstring>workspace_buttonTerminate</cstring>
+ <cstring>workspace_buttonAddGroup</cstring>
</property>
<property name="text">
- <string>Terminate Workspace</string>
+ <string>Add Group</string>
</property>
</widget>
<widget class="TQPushButton" row="0" column="1" colspan="1">
<property name="name">
- <cstring>workspace_buttonCancelTermination</cstring>
+ <cstring>workspace_buttonModifyGroup</cstring>
+ </property>
+ <property name="text">
+ <string>Modify Group</string>
+ </property>
+ </widget>
+ <widget class="TQPushButton" row="0" column="2" colspan="1">
+ <property name="name">
+ <cstring>workspace_buttonDeleteGroup</cstring>
</property>
<property name="text">
- <string>Cancel Termination</string>
+ <string>Delete Group</string>
</property>
</widget>
</grid>
@@ -329,7 +243,7 @@
</grid>
</widget>
<includes>
- <include location="local" impldecl="in implementation">AdminConsoleBase.ui.h</include>
+ <include location="local" impldecl="in implementation">UserManagementBase.ui.h</include>
</includes>
<includes>
<include location="local" impldecl="in implementation">tracewidget.h</include>
diff --git a/clients/tde/src/part/adminusermgmt/part.cpp b/clients/tde/src/part/adminusermgmt/part.cpp
index b233e84..8426ca0 100644
--- a/clients/tde/src/part/adminusermgmt/part.cpp
+++ b/clients/tde/src/part/adminusermgmt/part.cpp
@@ -61,28 +61,35 @@
#define NETWORK_COMM_TIMEOUT_MS 2500
enum connectionModes {
- ModeIdle = 0,
- ModeTerminate = 1
+ ModeIdle = 0,
+ ModeUpdate = 1,
+ ModeDelete = 2
};
enum connectionStates {
- ModeIdle_None = 0,
- ModeIdle_StateTerminalListRequest = 1,
- ModeIdle_StateProcessTerminalList = 2,
- ModeIdle_StateWorkspaceListRequest = 3,
- ModeIdle_StateProcessWorkspaceList = 4,
- ModeIdle_StateDelay = 5,
- ModeTerminate_TerminalServices = 6,
- ModeTerminate_LaboratoryWorkspace = 7,
- ModeTerminate_CancelTerminationOfWorkspace = 8,
- ModeTerminate_ProcessResponse = 9
+ ModeIdle_None = 0,
+ ModeIdle_StateTerminalListRequest = 1,
+ ModeIdle_StateProcessTerminalList = 2,
+ ModeIdle_StateWorkspaceListRequest = 3,
+ ModeIdle_StateProcessWorkspaceList = 4,
+ ModeIdle_StateTerminalAuthGroupListRequest = 5,
+ ModeIdle_StateProcessTerminalAuthGroupList = 6,
+ ModeIdle_StateWorkspaceServiceAuthGroupListRequest = 7,
+ ModeIdle_StateProcessWorkspaceServiceAuthGroupList = 8,
+ ModeIdle_StateDelay = 9,
+ ModeUpdate_TerminalServices = 10,
+ ModeUpdate_LaboratoryWorkspace = 11,
+ ModeUpdate_ProcessResponse = 12,
+ ModeDelete_TerminalServices = 13,
+ ModeDelete_LaboratoryWorkspace = 14,
+ ModeDelete_ProcessResponse = 15
};
namespace RemoteLab {
typedef KParts::GenericFactory<RemoteLab::UserManagementPart> Factory;
-#define CLIENT_LIBRARY "libremotelab_adminconsole"
-K_EXPORT_COMPONENT_FACTORY(libremotelab_adminconsole, RemoteLab::Factory)
+#define CLIENT_LIBRARY "libremotelab_adminusermgmt"
+K_EXPORT_COMPONENT_FACTORY(libremotelab_adminusermgmt, RemoteLab::Factory)
UserManagementPart::UserManagementPart(TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const TQStringList&)
: RemoteInstrumentPart( parent, name ), m_base(NULL), m_commHandlerState(0), m_connectionActiveAndValid(false), m_tickerState(0)
@@ -109,9 +116,14 @@ UserManagementPart::UserManagementPart(TQWidget *parentWidget, const char *widge
m_base = new UserManagementBase(widget());
// Initialize widgets
- connect(m_base->ts_buttonKill, SIGNAL(clicked()), this, SLOT(terminalServiceKillButtonClicked()));
- connect(m_base->workspace_buttonTerminate, SIGNAL(clicked()), this, SLOT(workspaceTerminateButtonClicked()));
- connect(m_base->workspace_buttonCancelTermination, SIGNAL(clicked()), this, SLOT(workspaceCancelTerminationButtonClicked()));
+ connect(m_base->ts_buttonAddGroup, SIGNAL(clicked()), this, SLOT(terminalServiceAddGroupButtonClicked()));
+ connect(m_base->ts_buttonModifyGroup, SIGNAL(clicked()), this, SLOT(terminalServiceModifyGroupButtonClicked()));
+ connect(m_base->ts_buttonDeleteGroup, SIGNAL(clicked()), this, SLOT(terminalServiceDeleteGroupButtonClicked()));
+ connect(m_base->workspace_buttonAddGroup, SIGNAL(clicked()), this, SLOT(workspaceAddGroupButtonClicked()));
+ connect(m_base->workspace_buttonModifyGroup, SIGNAL(clicked()), this, SLOT(workspaceModifyGroupButtonClicked()));
+ connect(m_base->workspace_buttonDeleteGroup, SIGNAL(clicked()), this, SLOT(workspaceDeleteGroupButtonClicked()));
+ connect(m_base->ts_list, SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)), this, SLOT(terminalServiceModifyGroupButtonClicked()));
+ connect(m_base->workspace_list, SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)), this, SLOT(workspaceModifyGroupButtonClicked()));
m_base->ts_list->setAllColumnsShowFocus(true);
connect(m_base->ts_list, SIGNAL(selectionChanged()), this, SLOT(terminalServiceListSelect()));
@@ -141,25 +153,31 @@ void UserManagementPart::processLockouts() {
}
}
- if ((m_connectionActiveAndValid == true) && (m_base->ts_list->selectedItem())) {
- m_base->ts_buttonKill->setEnabled(true);
+ if (m_connectionActiveAndValid == true) {
+ m_base->ts_buttonAddGroup->setEnabled(true);
+ m_base->workspace_buttonAddGroup->setEnabled(true);
}
else {
- m_base->ts_buttonKill->setEnabled(false);
+ m_base->ts_buttonAddGroup->setEnabled(false);
+ m_base->workspace_buttonAddGroup->setEnabled(false);
}
- if ((m_connectionActiveAndValid == true) && (m_base->workspace_list->selectedItem())) {
- m_base->workspace_buttonTerminate->setEnabled(true);
+ if ((m_connectionActiveAndValid == true) && (m_base->ts_list->selectedItem())) {
+ m_base->ts_buttonModifyGroup->setEnabled(true);
+ m_base->ts_buttonDeleteGroup->setEnabled(true);
}
else {
- m_base->workspace_buttonTerminate->setEnabled(false);
+ m_base->ts_buttonModifyGroup->setEnabled(false);
+ m_base->ts_buttonDeleteGroup->setEnabled(false);
}
if ((m_connectionActiveAndValid == true) && (m_base->workspace_list->selectedItem())) {
- m_base->workspace_buttonCancelTermination->setEnabled(true);
+ m_base->workspace_buttonModifyGroup->setEnabled(true);
+ m_base->workspace_buttonDeleteGroup->setEnabled(true);
}
else {
- m_base->workspace_buttonCancelTermination->setEnabled(false);
+ m_base->workspace_buttonModifyGroup->setEnabled(false);
+ m_base->workspace_buttonDeleteGroup->setEnabled(false);
}
}
@@ -213,44 +231,171 @@ void UserManagementPart::connectionStatusChangedCallback() {
processLockouts();
}
-void UserManagementPart::terminalServiceKillButtonClicked() {
+void UserManagementPart::terminalServiceAddGroupButtonClicked() {
+ GroupPermissionsDialog groupauthdlg(0);
+ groupauthdlg.setPermissionsSelectorLabel(i18n("Allowed Servers"));
+ {
+ TQKeyedStringList keyedServerList;
+ for (TQStringList::Iterator it2 = m_availableTerminalServersList.begin(); it2 != m_availableTerminalServersList.end(); ++it2) {
+ keyedServerList.append(TQKeyedStringPair(TQString("%1").arg(*it2), 0));
+ }
+ groupauthdlg.setAvailableServers(keyedServerList);
+ }
+ if (groupauthdlg.exec() == TQDialog::Accepted) {
+ m_updateTerminalServiceAuthGroupList.clear();
+ TerminalServiceAuthGroupType agt;
+ agt.groupName = groupauthdlg.groupName();
+
+ TQKeyedStringList selectedServers = groupauthdlg.selectedServers();
+ agt.allowedServerNames.clear();
+ for (TQKeyedStringList::Iterator it = selectedServers.begin(); it != selectedServers.end(); ++it) {
+ agt.allowedServerNames.append((*it).first);
+ }
+ m_updateTerminalServiceAuthGroupList.append(agt);
+ m_commHandlerNextState = ModeUpdate_TerminalServices;
+ m_commHandlerNextMode = ModeUpdate;
+ }
+
+ processLockouts();
+}
+
+void UserManagementPart::terminalServiceModifyGroupButtonClicked() {
+ TQListViewItem* item = m_base->ts_list->selectedItem();
+
+ GroupPermissionsDialog groupauthdlg(0);
+ groupauthdlg.setPermissionsSelectorLabel(i18n("Allowed Servers"));
+ {
+ TQKeyedStringList keyedServerList;
+ for (TQStringList::Iterator it2 = m_availableTerminalServersList.begin(); it2 != m_availableTerminalServersList.end(); ++it2) {
+ keyedServerList.append(TQKeyedStringPair(TQString("%1").arg(*it2), 0));
+ }
+ groupauthdlg.setAvailableServers(keyedServerList);
+ }
+ TerminalServiceAuthGroupList::iterator it = m_terminalServiceAuthGroupList.findByName(item->text(0));
+ if (it != m_terminalServiceAuthGroupList.end()) {
+ TQKeyedStringList keyedServerList;
+ for (TQStringList::Iterator it2 = (*it).allowedServerNames.begin(); it2 != (*it).allowedServerNames.end(); ++it2) {
+ keyedServerList.append(TQKeyedStringPair(TQString("%1").arg(*it2), 0));
+ }
+ groupauthdlg.setSelectedServers(keyedServerList);
+ }
+ groupauthdlg.setGroupName(item->text(0), false);
+ if (groupauthdlg.exec() == TQDialog::Accepted) {
+ m_updateTerminalServiceAuthGroupList.clear();
+ TerminalServiceAuthGroupType agt;
+ agt.groupName = groupauthdlg.groupName();
+ TQKeyedStringList selectedServers = groupauthdlg.selectedServers();
+ agt.allowedServerNames.clear();
+ for (TQKeyedStringList::Iterator it = selectedServers.begin(); it != selectedServers.end(); ++it) {
+ agt.allowedServerNames.append((*it).first);
+ }
+ m_updateTerminalServiceAuthGroupList.append(agt);
+ m_commHandlerNextState = ModeUpdate_TerminalServices;
+ m_commHandlerNextMode = ModeUpdate;
+ }
+
+ processLockouts();
+}
+
+void UserManagementPart::terminalServiceDeleteGroupButtonClicked() {
TQListViewItem* item = m_base->ts_list->selectedItem();
- TerminateDialog termdlg(0);
- termdlg.setWarningLabelText(i18n("Configure termination of Terminal Services for user %1").arg(item->text(1)));
- termdlg.enableDelayedTermination(false);
- if (termdlg.exec() == TQDialog::Accepted) {
- terminateSessionID = item->text(0);
- terminateSessionDelayMinutes = termdlg.minutes();
- m_commHandlerNextState = ModeTerminate_TerminalServices;
- m_commHandlerNextMode = ModeTerminate;
+ if (KMessageBox::warningYesNo(0, i18n("<qt><b>You are attempting to delete the group '%1'</b><br>You will not be able to undo this action<p>Do you wish to proceed?</qt>").arg(item->text(0)), i18n("Delete group?")) == KMessageBox::Yes) {
+ m_updateTerminalServiceAuthGroupList.clear();
+ TerminalServiceAuthGroupType agt;
+ agt.groupName = item->text(0);
+ m_updateTerminalServiceAuthGroupList.append(agt);
+ m_commHandlerNextState = ModeDelete_TerminalServices;
+ m_commHandlerNextMode = ModeDelete;
+ }
+
+ processLockouts();
+}
+
+void UserManagementPart::workspaceAddGroupButtonClicked() {
+ GroupPermissionsDialog groupauthdlg(0);
+ groupauthdlg.setPermissionsSelectorLabel(i18n("Allowed Stations"));
+ {
+ TQKeyedStringList friendlyStations;
+ for (StationList::iterator it = m_availableWorkspaceStationsList.begin(); it != m_availableWorkspaceStationsList.end(); ++it) {
+ friendlyStations.append(TQKeyedStringPair(TQString("%1").arg((*it).name), (*it).id));
+ }
+ groupauthdlg.setAvailableServers(friendlyStations);
+ }
+ if (groupauthdlg.exec() == TQDialog::Accepted) {
+ m_updateWorkspaceServiceAuthGroupList.clear();
+ WorkspaceServiceAuthGroupType agt;
+ agt.groupName = groupauthdlg.groupName();
+ TQKeyedStringList selectedStations = groupauthdlg.selectedServers();
+ agt.allowedStationIDs.clear();
+ for (TQKeyedStringList::Iterator it = selectedStations.begin(); it != selectedStations.end(); ++it) {
+ agt.allowedStationIDs.append((*it).second);
+ }
+ m_updateWorkspaceServiceAuthGroupList.append(agt);
+ m_commHandlerNextState = ModeUpdate_LaboratoryWorkspace;
+ m_commHandlerNextMode = ModeUpdate;
}
processLockouts();
}
-void UserManagementPart::workspaceTerminateButtonClicked() {
+void UserManagementPart::workspaceModifyGroupButtonClicked() {
TQListViewItem* item = m_base->workspace_list->selectedItem();
- TerminateDialog termdlg(0);
- termdlg.setWarningLabelText(i18n("Configure termination of Laboratory Workspace for user %1").arg(item->text(1)));
- termdlg.enableDelayedTermination(true);
- if (termdlg.exec() == TQDialog::Accepted) {
- terminateSessionID = item->text(0);
- terminateSessionDelayMinutes = termdlg.minutes();
- m_commHandlerNextState = ModeTerminate_LaboratoryWorkspace;
- m_commHandlerNextMode = ModeTerminate;
+ GroupPermissionsDialog groupauthdlg(0);
+ groupauthdlg.setPermissionsSelectorLabel(i18n("Allowed Stations"));
+ {
+ TQKeyedStringList friendlyStations;
+ for (StationList::iterator it = m_availableWorkspaceStationsList.begin(); it != m_availableWorkspaceStationsList.end(); ++it) {
+ friendlyStations.append(TQKeyedStringPair(TQString("%1").arg((*it).name), (*it).id));
+ }
+ groupauthdlg.setAvailableServers(friendlyStations);
+ }
+ WorkspaceServiceAuthGroupList::iterator it = m_workspaceAuthGroupList.findByName(item->text(0));
+ if (it != m_workspaceAuthGroupList.end()) {
+ TQKeyedStringList friendlyStations;
+ for (TQInt32List::Iterator it2 = (*it).allowedStationIDs.begin(); it2 != (*it).allowedStationIDs.end(); ++it2) {
+ int stationID = *it2;
+ StationList::iterator stationInfoIterator = m_availableWorkspaceStationsList.findByID(stationID);
+ if (stationInfoIterator != m_availableWorkspaceStationsList.end()) {
+ friendlyStations.append(TQKeyedStringPair(TQString("%1").arg((*stationInfoIterator).name), (*stationInfoIterator).id));
+ }
+ else {
+ friendlyStations.append(TQKeyedStringPair(TQString("<unknown>"), stationID));
+ }
+ }
+ groupauthdlg.setSelectedServers(friendlyStations);
+ }
+ groupauthdlg.setGroupName(item->text(0), false);
+ if (groupauthdlg.exec() == TQDialog::Accepted) {
+ m_updateWorkspaceServiceAuthGroupList.clear();
+ WorkspaceServiceAuthGroupType agt;
+ agt.groupName = groupauthdlg.groupName();
+ TQKeyedStringList selectedStations = groupauthdlg.selectedServers();
+ agt.allowedStationIDs.clear();
+ for (TQKeyedStringList::Iterator it = selectedStations.begin(); it != selectedStations.end(); ++it) {
+ agt.allowedStationIDs.append((*it).second);
+ }
+ m_updateWorkspaceServiceAuthGroupList.append(agt);
+ m_commHandlerNextState = ModeUpdate_LaboratoryWorkspace;
+ m_commHandlerNextMode = ModeUpdate;
}
processLockouts();
}
-void UserManagementPart::workspaceCancelTerminationButtonClicked() {
+void UserManagementPart::workspaceDeleteGroupButtonClicked() {
TQListViewItem* item = m_base->workspace_list->selectedItem();
- terminateSessionID = item->text(0);
- m_commHandlerNextState = ModeTerminate_CancelTerminationOfWorkspace;
- m_commHandlerNextMode = ModeTerminate;
+ if (KMessageBox::warningYesNo(0, i18n("<qt><b>You are attempting to delete the group '%1'</b><br>You will not be able to undo this action<p>Do you wish to proceed?</qt>").arg(item->text(0)), i18n("Delete group?")) == KMessageBox::Yes) {
+ m_updateWorkspaceServiceAuthGroupList.clear();
+ WorkspaceServiceAuthGroupType agt;
+ agt.groupName = item->text(0);
+ agt.allowedStationIDs.clear();
+ m_updateWorkspaceServiceAuthGroupList.append(agt);
+ m_commHandlerNextState = ModeDelete_LaboratoryWorkspace;
+ m_commHandlerNextMode = ModeDelete;
+ }
processLockouts();
}
@@ -383,7 +528,7 @@ void UserManagementPart::mainEventLoop() {
// Get status of remote system
// Clear buffers to synchronize frames in case of data corruption
m_socket->clearIncomingData();
- ds << TQString("USERS");
+ ds << TQString("LIST");
ds << TQString("TERMINALS");
m_socket->writeEndOfFrame();
@@ -395,23 +540,89 @@ void UserManagementPart::mainEventLoop() {
PAT_WATCHDOG_TIMER
TQString status;
- TerminalServiceStatusList list;
ds >> status;
if (status == "OK") {
- ds >> list;
+ ds >> m_availableTerminalServersList;
+ m_socket->clearFrameTail();
+
+ setTickerMessage(i18n("Connected"));
+ }
+
+ SET_NEXT_STATE(ModeIdle_StateWorkspaceListRequest);
+ EXEC_NEXT_STATE_IMMEDIATELY
+ }
+ else {
+ if (!m_updateTimeoutTimer->isActive()) {
+ UPDATEDISPLAY_TIMEOUT
+ }
+ }
+ break;
+ case ModeIdle_StateWorkspaceListRequest:
+ // Get status of remote system
+ // Clear buffers to synchronize frames in case of data corruption
+ m_socket->clearIncomingData();
+ ds << TQString("LIST");
+ ds << TQString("WORKSPACES");
+ m_socket->writeEndOfFrame();
+
+ SET_NEXT_STATE(ModeIdle_StateProcessWorkspaceList)
+ EXEC_NEXT_STATE_IMMEDIATELY
+ break;
+ case ModeIdle_StateProcessWorkspaceList:
+ // Get all data
+ if (m_socket->canReadFrame()) {
+ PAT_WATCHDOG_TIMER
+
+ TQString status;
+ ds >> status;
+ if (status == "OK") {
+ ds >> m_availableWorkspaceStationsList;
m_socket->clearFrameTail();
- TerminalServiceStatusList::iterator it;
+ setTickerMessage(i18n("Connected"));
+ }
+
+ SET_NEXT_STATE(ModeIdle_StateTerminalAuthGroupListRequest);
+ EXEC_NEXT_STATE_IMMEDIATELY
+ }
+ else {
+ if (!m_updateTimeoutTimer->isActive()) {
+ UPDATEDISPLAY_TIMEOUT
+ }
+ }
+ break;
+ case ModeIdle_StateTerminalAuthGroupListRequest:
+ // Get status of remote system
+ // Clear buffers to synchronize frames in case of data corruption
+ m_socket->clearIncomingData();
+ ds << TQString("LISTGROUPACCESS");
+ ds << TQString("TERMINALS");
+ m_socket->writeEndOfFrame();
+
+ SET_NEXT_STATE(ModeIdle_StateProcessTerminalAuthGroupList)
+ break;
+ case ModeIdle_StateProcessTerminalAuthGroupList:
+ // Get all data
+ if (m_socket->canReadFrame()) {
+ PAT_WATCHDOG_TIMER
+
+ TQString status;
+ ds >> status;
+ if (status == "OK") {
+ ds >> m_terminalServiceAuthGroupList;
+ m_socket->clearFrameTail();
+
+ TerminalServiceAuthGroupList::iterator it;
TQListViewItemIterator it2;
- for (it = list.begin(); it != list.end(); ++it) {
- TerminalServiceStatusType info = *it;
+ for (it = m_terminalServiceAuthGroupList.begin(); it != m_terminalServiceAuthGroupList.end(); ++it) {
+ TerminalServiceAuthGroupType info = *it;
it2 = TQListViewItemIterator(m_base->ts_list);
bool found = false;
TQListViewItem* item = NULL;
while (it2.current()) {
item = *it2;
- if (info.sessionID == item->text(0).toInt()) {
+ if (info.groupName == item->text(0)) {
found = true;
break;
}
@@ -420,22 +631,16 @@ void UserManagementPart::mainEventLoop() {
if (!found) {
item = new TQListViewItem(m_base->ts_list);
}
- item->setText(0, TQString("%1").arg(info.sessionID));
- item->setText(1, info.username);
- item->setText(2, info.serverName);
- item->setText(3, TQString("%1").arg(info.serverPID));
- item->setText(4, TQString("%1").arg(info.wmPID));
- item->setText(5, TQString(":%1").arg(info.display));
- item->setText(6, info.loginStamp.toString());
- item->setText(7, info.activityStamp.toString());
+ item->setText(0, TQString("%1").arg(info.groupName));
+ item->setText(1, info.allowedServerNames.join(", "));
}
it2 = TQListViewItemIterator(m_base->ts_list);
while (it2.current()) {
TQListViewItem* item = *it2;
bool found = false;
- for (it = list.begin(); it != list.end(); ++it) {
- TerminalServiceStatusType info = *it;
- if (info.sessionID == item->text(0).toInt()) {
+ for (it = m_terminalServiceAuthGroupList.begin(); it != m_terminalServiceAuthGroupList.end(); ++it) {
+ TerminalServiceAuthGroupType info = *it;
+ if (info.groupName == item->text(0)) {
found = true;
}
}
@@ -448,7 +653,7 @@ void UserManagementPart::mainEventLoop() {
setTickerMessage(i18n("Connected"));
}
- SET_NEXT_STATE(ModeIdle_StateWorkspaceListRequest);
+ SET_NEXT_STATE(ModeIdle_StateWorkspaceServiceAuthGroupListRequest);
EXEC_NEXT_STATE_IMMEDIATELY
}
else {
@@ -457,43 +662,39 @@ void UserManagementPart::mainEventLoop() {
}
}
break;
- case ModeIdle_StateWorkspaceListRequest:
+ case ModeIdle_StateWorkspaceServiceAuthGroupListRequest:
// Get status of remote system
// Clear buffers to synchronize frames in case of data corruption
m_socket->clearIncomingData();
- ds << TQString("USERS");
+ ds << TQString("LISTGROUPACCESS");
ds << TQString("WORKSPACES");
m_socket->writeEndOfFrame();
- SET_NEXT_STATE(ModeIdle_StateProcessWorkspaceList)
+ SET_NEXT_STATE(ModeIdle_StateProcessWorkspaceServiceAuthGroupList)
EXEC_NEXT_STATE_IMMEDIATELY
break;
- case ModeIdle_StateProcessWorkspaceList:
+ case ModeIdle_StateProcessWorkspaceServiceAuthGroupList:
// Get all data
if (m_socket->canReadFrame()) {
PAT_WATCHDOG_TIMER
TQString status;
- WorkspaceServiceStatusList list;
ds >> status;
if (status == "OK") {
- ds >> list;
+ ds >> m_workspaceAuthGroupList;
m_socket->clearFrameTail();
- WorkspaceServiceStatusList::iterator it;
+ WorkspaceServiceAuthGroupList::iterator it;
TQListViewItemIterator it2;
- for (it = list.begin(); it != list.end(); ++it) {
- WorkspaceServiceStatusType info = *it;
- if (info.serviceID != 0) {
- continue;
- }
+ for (it = m_workspaceAuthGroupList.begin(); it != m_workspaceAuthGroupList.end(); ++it) {
+ WorkspaceServiceAuthGroupType info = *it;
it2 = TQListViewItemIterator(m_base->workspace_list);
bool found = false;
TQListViewItem* item = NULL;
while (it2.current()) {
item = *it2;
- if (info.sessionID == item->text(0).toInt()) {
+ if (info.groupName == item->text(0)) {
found = true;
break;
}
@@ -502,23 +703,27 @@ void UserManagementPart::mainEventLoop() {
if (!found) {
item = new TQListViewItem(m_base->workspace_list);
}
- item->setText(0, TQString("%1").arg(info.sessionID));
- item->setText(1, info.username);
- item->setText(2, info.realmname);
- item->setText(3, TQString("%1").arg(info.stationName));
- item->setText(4, info.loginStamp.toString());
- item->setText(5, (info.terminateStamp.toTime_t()==0)?i18n("Not Set"):info.terminateStamp.toString());
+ item->setText(0, TQString("%1").arg(info.groupName));
+ TQString allowedStationsText;
+ TQInt32List::iterator it3;
+ for (it3 = info.allowedStationIDs.begin(); it3 != info.allowedStationIDs.end(); ++it3) {
+ StationList::iterator stationInfoIterator = m_availableWorkspaceStationsList.findByID(*it3);
+ if (stationInfoIterator != m_availableWorkspaceStationsList.end()) {
+ if (allowedStationsText != "") {
+ allowedStationsText.append(", ");
+ }
+ allowedStationsText.append((*stationInfoIterator).name);
+ }
+ }
+ item->setText(1, allowedStationsText);
}
it2 = TQListViewItemIterator(m_base->workspace_list);
while (it2.current()) {
TQListViewItem* item = *it2;
bool found = false;
- for (it = list.begin(); it != list.end(); ++it) {
- WorkspaceServiceStatusType info = *it;
- if (info.serviceID != 0) {
- continue;
- }
- if (info.sessionID == item->text(0).toInt()) {
+ for (it = m_workspaceAuthGroupList.begin(); it != m_workspaceAuthGroupList.end(); ++it) {
+ WorkspaceServiceAuthGroupType info = *it;
+ if (info.groupName == item->text(0)) {
found = true;
}
}
@@ -527,11 +732,11 @@ void UserManagementPart::mainEventLoop() {
}
++it2;
}
-
+
setTickerMessage(i18n("Connected"));
}
- if (m_commHandlerState == ModeIdle_StateProcessWorkspaceList) {
+ if (m_commHandlerState == ModeIdle_StateProcessWorkspaceServiceAuthGroupList) {
m_pingDelayTimer->start(250, TRUE);
SET_NEXT_STATE(ModeIdle_StateDelay);
}
@@ -562,37 +767,73 @@ void UserManagementPart::mainEventLoop() {
break;
}
}
- else if (m_commHandlerMode == ModeTerminate) {
+ else if (m_commHandlerMode == ModeUpdate) {
switch (m_commHandlerState) {
- case ModeTerminate_TerminalServices:
- ds << TQString("SESSION");
- ds << TQString("KILL_TERMINAL");
- ds << terminateSessionID;
+ case ModeUpdate_TerminalServices:
+ ds << TQString("SETGROUPACCESS");
+ ds << TQString("TERMINALS");
+ ds << m_updateTerminalServiceAuthGroupList;
m_socket->writeEndOfFrame();
- SET_NEXT_STATE(ModeTerminate_ProcessResponse)
+ SET_NEXT_STATE(ModeUpdate_ProcessResponse)
EXEC_NEXT_STATE_IMMEDIATELY
break;
- case ModeTerminate_LaboratoryWorkspace:
- ds << TQString("SESSION");
- ds << TQString("KILL_WORKSPACE");
- ds << terminateSessionID;
- ds << terminateSessionDelayMinutes;
+ case ModeUpdate_LaboratoryWorkspace:
+ ds << TQString("SETGROUPACCESS");
+ ds << TQString("WORKSPACES");
+ ds << m_updateWorkspaceServiceAuthGroupList;
m_socket->writeEndOfFrame();
- SET_NEXT_STATE(ModeTerminate_ProcessResponse)
+ SET_NEXT_STATE(ModeUpdate_ProcessResponse)
EXEC_NEXT_STATE_IMMEDIATELY
break;
- case ModeTerminate_CancelTerminationOfWorkspace:
- ds << TQString("SESSION");
- ds << TQString("CANCEL_KILL_WORKSPACE");
- ds << terminateSessionID;
+ case ModeUpdate_ProcessResponse:
+ // Get all data
+ if (m_socket->canReadFrame()) {
+ PAT_WATCHDOG_TIMER
+
+ TQString status;
+ WorkspaceServiceStatusList list;
+ ds >> status;
+
+ if (status != "OK") {
+ // Command failed!
+ KMessageBox::error(0, i18n("Command Failure"), i18n("Unable to execute command!"));
+ }
+
+ m_commHandlerMode = ModeIdle;
+ SET_NEXT_STATE(ModeIdle_StateTerminalListRequest);
+ EXEC_NEXT_STATE_IMMEDIATELY
+ }
+ else {
+ if (!m_updateTimeoutTimer->isActive()) {
+ UPDATEDISPLAY_TIMEOUT
+ }
+ }
+ break;
+ }
+ }
+ else if (m_commHandlerMode == ModeDelete) {
+ switch (m_commHandlerState) {
+ case ModeDelete_TerminalServices:
+ ds << TQString("DELETEGROUPACCESS");
+ ds << TQString("TERMINALS");
+ ds << m_updateTerminalServiceAuthGroupList;
+ m_socket->writeEndOfFrame();
+
+ SET_NEXT_STATE(ModeDelete_ProcessResponse)
+ EXEC_NEXT_STATE_IMMEDIATELY
+ break;
+ case ModeDelete_LaboratoryWorkspace:
+ ds << TQString("DELETEGROUPACCESS");
+ ds << TQString("WORKSPACES");
+ ds << m_updateWorkspaceServiceAuthGroupList;
m_socket->writeEndOfFrame();
- SET_NEXT_STATE(ModeTerminate_ProcessResponse)
+ SET_NEXT_STATE(ModeDelete_ProcessResponse)
EXEC_NEXT_STATE_IMMEDIATELY
break;
- case ModeTerminate_ProcessResponse:
+ case ModeDelete_ProcessResponse:
// Get all data
if (m_socket->canReadFrame()) {
PAT_WATCHDOG_TIMER
diff --git a/clients/tde/src/part/adminusermgmt/part.h b/clients/tde/src/part/adminusermgmt/part.h
index f65b5cc..00d4577 100644
--- a/clients/tde/src/part/adminusermgmt/part.h
+++ b/clients/tde/src/part/adminusermgmt/part.h
@@ -20,8 +20,8 @@
* http://www.raptorengineeringinc.com
*/
-#ifndef REMOTELAB_ADMINCONSOLEPART_H
-#define REMOTELAB_ADMINCONSOLEPART_H
+#ifndef REMOTELAB_USERMGMTPART_H
+#define REMOTELAB_USERMGMTPART_H
#include <tdekrbclientsocket.h>
@@ -74,9 +74,12 @@ namespace RemoteLab
void connectionStatusChangedCallback();
void setTickerMessage(TQString message);
- void terminalServiceKillButtonClicked();
- void workspaceTerminateButtonClicked();
- void workspaceCancelTerminationButtonClicked();
+ void terminalServiceAddGroupButtonClicked();
+ void terminalServiceModifyGroupButtonClicked();
+ void terminalServiceDeleteGroupButtonClicked();
+ void workspaceAddGroupButtonClicked();
+ void workspaceModifyGroupButtonClicked();
+ void workspaceDeleteGroupButtonClicked();
void terminalServiceListSelect();
void workspaceListSelect();
@@ -92,13 +95,18 @@ namespace RemoteLab
int m_commHandlerMode;
int m_commHandlerNextState;
int m_commHandlerNextMode;
- TQString terminateSessionID;
- TQ_INT32 terminateSessionDelayMinutes;
+ TerminalServiceAuthGroupList m_updateTerminalServiceAuthGroupList;
+ WorkspaceServiceAuthGroupList m_updateWorkspaceServiceAuthGroupList;
bool m_connectionActiveAndValid;
unsigned char m_tickerState;
TQByteArray m_programmingFileData;
TQ_ULONG m_programmingFileTotalSize;
TQ_ULONG m_programmingFileTransferredBytes;
+
+ TQStringList m_availableTerminalServersList;
+ StationList m_availableWorkspaceStationsList;
+ TerminalServiceAuthGroupList m_terminalServiceAuthGroupList;
+ WorkspaceServiceAuthGroupList m_workspaceAuthGroupList;
};
}
diff --git a/clients/tde/src/part/adminusermgmt/terminatedlg.cpp b/clients/tde/src/part/adminusermgmt/terminatedlg.cpp
index f87ae4b..ac1a43f 100644
--- a/clients/tde/src/part/adminusermgmt/terminatedlg.cpp
+++ b/clients/tde/src/part/adminusermgmt/terminatedlg.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2012 by Timothy Pearson *
+ * Copyright (C) 2013 by Timothy Pearson *
* kb9vqf@pearsoncomputing.net *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -28,6 +28,7 @@
#include <tqpixmap.h>
#include <tqiconset.h>
#include <tqlabel.h>
+#include <tqgroupbox.h>
#include <kconfig.h>
#include <tqcheckbox.h>
#include <tqradiobutton.h>
@@ -35,60 +36,100 @@
#include "terminatedlgbase.h"
#include "terminatedlg.h"
-TerminateDialog::TerminateDialog(TQWidget* parent, const char* name)
- : KDialogBase(parent, name, true, i18n("Terminate Session"), Ok|Cancel, Ok, true)
+TQListBoxKeyedText::TQListBoxKeyedText(TQListBox* listbox, const TQString & text, const TQ_UINT32 key) : TQListBoxText(listbox, text), m_key(key) {
+ //
+}
+
+TQListBoxKeyedText::TQListBoxKeyedText(const TQString & text, const TQ_UINT32 key) : TQListBoxText(text), m_key(key) {
+ //
+}
+
+TQListBoxKeyedText::TQListBoxKeyedText(TQListBox* listbox, const TQString & text, const TQ_UINT32 key, TQListBoxItem *after) : TQListBoxText(listbox, text, after), m_key(key) {
+ //
+}
+
+TQListBoxKeyedText::~TQListBoxKeyedText() {
+ //
+}
+
+TQ_UINT32 TQListBoxKeyedText::key() {
+ return m_key;
+}
+
+GroupPermissionsDialog::GroupPermissionsDialog(TQWidget* parent, const char* name)
+ : KDialogBase(parent, name, true, i18n("Manage Permissions"), Ok|Cancel, Ok, true)
{
- m_base = new TerminateDlgBase(this);
+ m_base = new GroupPermissionsDlgBase(this);
+ m_base->permissionsSelector->availableListBox()->setSelectionMode(TQListBox::Multi);
+ m_base->permissionsSelector->selectedListBox()->setSelectionMode(TQListBox::Multi);
setMainWidget(m_base);
- connect(m_base->m_btnImmediate, SIGNAL(clicked()), this, SLOT(processLockouts()));
- connect(m_base->m_btnDelayed, SIGNAL(clicked()), this, SLOT(processLockouts()));
+ connect(m_base->m_groupName, SIGNAL(textChanged(const TQString&)), this, SLOT(processLockouts()));
+ m_base->m_groupName->setFocus();
- m_base->m_btnDelayed->setChecked(false);
- m_base->m_btnImmediate->setChecked(true);
processLockouts();
}
-void TerminateDialog::processLockouts() {
- if (m_base->m_btnDelayed->isChecked()) {
- m_base->terminateMinutes->setEnabled(true);
+void GroupPermissionsDialog::processLockouts() {
+ if (m_base->m_groupName->text() != "") {
+ enableButtonOK(true);
}
- if (m_base->m_btnImmediate->isChecked()) {
- m_base->terminateMinutes->setEnabled(false);
+ else {
+ enableButtonOK(false);
}
}
-void TerminateDialog::setWarningLabelText(TQString text) {
- m_base->m_warningLabel->setText(text);
+void GroupPermissionsDialog::setGroupName(TQString name, bool editable) {
+ m_base->m_groupName->setText(name);
+ m_base->m_groupName->setEnabled(editable);
}
-void TerminateDialog::enableDelayedTermination(bool enabled) {
- if (enabled) {
- m_base->m_btnImmediate->setEnabled(true);
- m_base->m_btnDelayed->setEnabled(true);
- }
- else {
- m_base->m_btnImmediate->setChecked(true);
- m_base->m_btnImmediate->setEnabled(true);
- m_base->m_btnDelayed->setEnabled(false);
- }
+TQString GroupPermissionsDialog::groupName() {
+ return m_base->m_groupName->text();
}
-bool TerminateDialog::delayed() {
- return m_base->m_btnDelayed->isChecked();
+void GroupPermissionsDialog::setPermissionsSelectorLabel(TQString label) {
+ m_base->groupPermissionsSelector->setTitle(label);
}
-int TerminateDialog::minutes() {
- if (m_base->m_btnDelayed->isChecked()) {
- return m_base->terminateMinutes->value();
+void GroupPermissionsDialog::setAvailableServers(TQKeyedStringList list) {
+ TQListBox* availableListBox = m_base->permissionsSelector->availableListBox();
+ for (TQKeyedStringList::Iterator it = list.begin(); it != list.end(); ++it) {
+ new TQListBoxKeyedText(availableListBox, (*it).first, (*it).second);
}
- else {
- return -1;
+ availableListBox->sort(true);
+}
+
+void GroupPermissionsDialog::setSelectedServers(TQKeyedStringList list) {
+ TQListBox* availableListBox = m_base->permissionsSelector->availableListBox();
+ TQListBox* selectedListBox = m_base->permissionsSelector->selectedListBox();
+ for (TQKeyedStringList::Iterator it = list.begin(); it != list.end(); ++it) {
+ TQListBoxItem* item = availableListBox->findItem((*it).first, ExactMatch);
+ if (item) {
+ delete item;
+ }
+ new TQListBoxKeyedText(selectedListBox, (*it).first, (*it).second);
+ }
+ availableListBox->sort(true);
+ selectedListBox->sort(true);
+}
+
+TQKeyedStringList GroupPermissionsDialog::selectedServers() {
+ TQKeyedStringList list;
+ TQListBox* selectedListBox = m_base->permissionsSelector->selectedListBox();
+ TQListBoxItem* item = selectedListBox->firstItem();
+ while (item) {
+ TQListBoxKeyedText* item2 = dynamic_cast<TQListBoxKeyedText*>(item);
+ if (item2) {
+ list.append(TQKeyedStringPair(item2->text(), item2->key()));
+ }
+ item = item->next();
}
+ return list;
}
-void TerminateDialog::slotOk() {
+void GroupPermissionsDialog::slotOk() {
accept();
}
diff --git a/clients/tde/src/part/adminusermgmt/terminatedlg.h b/clients/tde/src/part/adminusermgmt/terminatedlg.h
index eff6080..df15265 100644
--- a/clients/tde/src/part/adminusermgmt/terminatedlg.h
+++ b/clients/tde/src/part/adminusermgmt/terminatedlg.h
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2012 by Timothy Pearson *
+ * Copyright (C) 2013 by Timothy Pearson *
* kb9vqf@pearsoncomputing.net *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -24,30 +24,50 @@
#include <kdialogbase.h>
#include <kcombobox.h>
-class TerminateDlgBase;
+class GroupPermissionsDlgBase;
class TopLevel;
-class TerminateDialog : public KDialogBase
-{
- Q_OBJECT
+typedef TQPair< TQString, TQ_UINT32 > TQKeyedStringPair;
+typedef TQValueList< TQKeyedStringPair > TQKeyedStringList;
-public:
- TerminateDialog(TQWidget* parent = 0, const char* name = 0);
+class TQListBoxKeyedText : public TQListBoxText
+{
+ public:
+ TQListBoxKeyedText(TQListBox* listbox, const TQString & text=TQString::null, const TQ_UINT32 key=0);
+ TQListBoxKeyedText(const TQString & text=TQString::null, const TQ_UINT32 key=0 );
+ TQListBoxKeyedText(TQListBox* listbox, const TQString & text, const TQ_UINT32 key, TQListBoxItem *after);
+ ~TQListBoxKeyedText();
-public slots:
- void slotOk();
+ public:
+ TQ_UINT32 key();
-public:
- void enableDelayedTermination(bool enabled);
- void setWarningLabelText(TQString text);
- bool delayed();
- int minutes();
+ private:
+ TQ_UINT32 m_key;
+};
-private slots:
- void processLockouts();
+class GroupPermissionsDialog : public KDialogBase
+{
+ Q_OBJECT
-private:
- TerminateDlgBase *m_base;
+ public:
+ GroupPermissionsDialog(TQWidget* parent = 0, const char* name = 0);
+
+ public:
+ void setGroupName(TQString name, bool editable);
+ TQString groupName();
+ void setPermissionsSelectorLabel(TQString label);
+ void setAvailableServers(TQKeyedStringList list);
+ void setSelectedServers(TQKeyedStringList list);
+ TQKeyedStringList selectedServers();
+
+ public slots:
+ void slotOk();
+
+ private slots:
+ void processLockouts();
+
+ private:
+ GroupPermissionsDlgBase *m_base;
};
#endif
diff --git a/clients/tde/src/part/adminusermgmt/terminatedlgbase.ui b/clients/tde/src/part/adminusermgmt/terminatedlgbase.ui
index 385f0b6..ced61a0 100644
--- a/clients/tde/src/part/adminusermgmt/terminatedlgbase.ui
+++ b/clients/tde/src/part/adminusermgmt/terminatedlgbase.ui
@@ -1,8 +1,8 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>TerminateDlgBase</class>
+<class>GroupPermissionsDlgBase</class>
<widget class="TQWidget">
<property name="name">
- <cstring>TerminateDlgBase</cstring>
+ <cstring>GroupPermissionsDlgBase</cstring>
</property>
<grid>
<widget class="TQButtonGroup">
@@ -25,52 +25,33 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="TQLabel" row="0" column="0" colspan="2">
+ <widget class="TQLabel" row="0" column="0" colspan="0">
<property name="name">
- <cstring>m_warningLabel</cstring>
+ <cstring>m_groupNameLabel</cstring>
</property>
<property name="text">
- <string></string>
+ <string>Group Name:</string>
</property>
</widget>
- <widget class="TQRadioButton" row="1" column="0">
+ <widget class="KLineEdit" row="0" column="1" colspan="0">
<property name="name">
- <cstring>m_btnImmediate</cstring>
- </property>
- <property name="focusPolicy">
- <enum>NoFocus</enum>
+ <cstring>m_groupName</cstring>
</property>
<property name="text">
- <string>Terminate Now</string>
+ <string></string>
</property>
</widget>
- <widget class="TQRadioButton" row="2" column="0">
+ <widget class="TQGroupBox" row="1" column="0" colspan="2">
<property name="name">
- <cstring>m_btnDelayed</cstring>
- </property>
- <property name="focusPolicy">
- <enum>NoFocus</enum>
- </property>
- <property name="text">
- <string>Terminate After</string>
+ <cstring>groupPermissionsSelector</cstring>
</property>
- </widget>
- <widget class="TQLayoutWidget" row="2" column="1">
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="KIntNumInput" row="0" column="1">
+ <widget class="KActionSelector" row="0" column="0">
<property name="name">
- <cstring>terminateMinutes</cstring>
- </property>
- </widget>
- <widget class="TQLabel" row="0" column="2">
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="text">
- <string>minutes</string>
+ <cstring>permissionsSelector</cstring>
</property>
</widget>
</grid>