summaryrefslogtreecommitdiffstats
path: root/src/userconfigdlg.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-05-29 23:16:59 -0500
committerTimothy Pearson <[email protected]>2012-05-29 23:16:59 -0500
commita890828d5269f6535567dcb3498eba62d5335ee1 (patch)
tree6ebcb734c94463ced7f6cb04daf05656ff267ad2 /src/userconfigdlg.cpp
parenta6d06dfe2ab0aadb6b0987fb7f96e8f3c9841846 (diff)
downloadkcmldapmanager-a890828d5269f6535567dcb3498eba62d5335ee1.tar.gz
kcmldapmanager-a890828d5269f6535567dcb3498eba62d5335ee1.zip
Can now add and delete groups
Diffstat (limited to 'src/userconfigdlg.cpp')
-rw-r--r--src/userconfigdlg.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/userconfigdlg.cpp b/src/userconfigdlg.cpp
index a2ad641..3487b01 100644
--- a/src/userconfigdlg.cpp
+++ b/src/userconfigdlg.cpp
@@ -47,9 +47,12 @@ UserConfigDialog::UserConfigDialog(LDAPUserInfo user, LDAPConfig* parent, const
for ( TQStringList::Iterator it = availableShells.begin(); it != availableShells.end(); ++it ) {
m_base->shell->insertItem(*it, -1);
}
- m_base->loginName->setEnabled(false);
+ if (user.distinguishedName != "") {
+ m_base->loginName->setEnabled(false);
+ }
m_base->lastChanged->setEnabled(false);
+ connect(m_base->loginName, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(processLockouts()));
connect(m_base->passwordExpireEnabled, TQT_SIGNAL(clicked()), this, TQT_SLOT(processLockouts()));
connect(m_base->passwordExpireDisabled, TQT_SIGNAL(clicked()), this, TQT_SLOT(processLockouts()));
connect(m_base->requirePasswordAging, TQT_SIGNAL(clicked()), this, TQT_SLOT(processLockouts()));
@@ -113,6 +116,11 @@ void UserConfigDialog::slotOk() {
// Update data
// RAJA FIXME
+ // Special handler for new group
+ if (m_user.distinguishedName == "") {
+ m_user.name = m_base->loginName->text();
+ }
+
accept();
}
@@ -158,6 +166,14 @@ void UserConfigDialog::processLockouts() {
++it;
}
+ // Special handler for new group
+ if ((m_user.distinguishedName == "") && (m_base->loginName->text() == "")) {
+ enableButton(KDialogBase::Ok, false);
+ }
+ else {
+ enableButton(KDialogBase::Ok, true);
+ }
+
m_prevPrimaryGroup = m_base->primaryGroup->currentText();
}