summaryrefslogtreecommitdiffstats
path: root/src/ldapmgr.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-03-23 01:08:28 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-03-23 01:08:28 -0500
commitd969e63d2c0d827a33f68c4f5c0ec1634c390fd0 (patch)
tree5ae59c16042a6bb822f653244305cfe52a1a2baa /src/ldapmgr.cpp
parent9e37d8b745632d3da494c68f66f31d8e304c6e41 (diff)
downloadkcmldapmanager-d969e63d2c0d827a33f68c4f5c0ec1634c390fd0.tar.gz
kcmldapmanager-d969e63d2c0d827a33f68c4f5c0ec1634c390fd0.zip
Add machine add dialog
Add user list command to cmdline utility Fix user add command in cmdline utility
Diffstat (limited to 'src/ldapmgr.cpp')
-rw-r--r--src/ldapmgr.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/ldapmgr.cpp b/src/ldapmgr.cpp
index 5da7169..3d7e581 100644
--- a/src/ldapmgr.cpp
+++ b/src/ldapmgr.cpp
@@ -48,6 +48,7 @@
#include "ldappasswddlg.h"
#include "userconfigdlg.h"
#include "groupconfigdlg.h"
+#include "machineconfigdlg.h"
#include "serviceconfigdlg.h"
// FIXME
@@ -91,7 +92,7 @@ LDAPConfig::LDAPConfig(TQWidget *parent, const char *name, const TQStringList&)
base->service_author->setEnabled(false);
base->user_icon->setPixmap(SmallIcon("personal.png"));
- base->group_icon->setPixmap(SmallIcon("kdmconfig.png"));
+ base->group_icon->setPixmap(SmallIcon("tdmconfig.png"));
base->machine_icon->setPixmap(SmallIcon("system.png"));
base->service_icon->setPixmap(SmallIcon("kcmsystem.png"));
@@ -108,6 +109,7 @@ LDAPConfig::LDAPConfig(TQWidget *parent, const char *name, const TQStringList&)
connect(base->user_buttonAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(addNewUser()));
connect(base->group_buttonAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(addNewGroup()));
+ connect(base->machine_buttonAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(addNewMachine()));
connect(base->service_buttonAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(addNewService()));
connect(base->user_buttonModify, TQT_SIGNAL(clicked()), this, TQT_SLOT(modifySelectedUser()));
connect(base->group_buttonModify, TQT_SIGNAL(clicked()), this, TQT_SLOT(modifySelectedGroup()));
@@ -235,11 +237,9 @@ void LDAPConfig::processLockouts() {
else {
base->machine_buttonDelete->setEnabled(false);
}
+ base->machine_buttonAdd->setEnabled(connected);
// FIXME
- // Disable machine add/modify as they are not implemented
- // In fact, I don't know if I CAN implement them!
- // Think about it...yes you can add the 'add' feature...kadmin 'ank --random-key host/HOSTNAME.FQDN'...
- base->machine_buttonAdd->setEnabled(false);
+ // Disable machine modify as it is not yet implemented
base->machine_buttonModify->setEnabled(false);
base->machine_buttonRefresh->setEnabled(connected);
@@ -777,6 +777,21 @@ void LDAPConfig::addNewGroup() {
updateAllInformation();
}
+void LDAPConfig::addNewMachine() {
+ // Launch a dialog to add the machine
+ LDAPMachineInfo machine;
+
+ MachineConfigDialog machineconfigdlg(machine, m_ldapmanager->realm(), this);
+ if (machineconfigdlg.exec() == TQDialog::Accepted) {
+ machine = machineconfigdlg.m_machine;
+ TQString errorstring;
+ if (m_ldapmanager->addMachineInfo(machine, &errorstring) != 0) {
+ KMessageBox::error(0, i18n("<qt>Unable to add new machine!<p>%1</qt>").arg(errorstring), i18n("Internal Failure"));
+ }
+ }
+ updateAllInformation();
+}
+
void LDAPConfig::addNewService() {
// Launch a dialog to add the service
LDAPServiceInfo service;