diff options
author | Timothy Pearson <[email protected]> | 2012-05-29 23:16:59 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-05-29 23:16:59 -0500 |
commit | a890828d5269f6535567dcb3498eba62d5335ee1 (patch) | |
tree | 6ebcb734c94463ced7f6cb04daf05656ff267ad2 /src/userconfigdlg.cpp | |
parent | a6d06dfe2ab0aadb6b0987fb7f96e8f3c9841846 (diff) | |
download | kcmldapmanager-a890828d5269f6535567dcb3498eba62d5335ee1.tar.gz kcmldapmanager-a890828d5269f6535567dcb3498eba62d5335ee1.zip |
Can now add and delete groups
Diffstat (limited to 'src/userconfigdlg.cpp')
-rw-r--r-- | src/userconfigdlg.cpp | 18 |
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(); } |