# Setup LDAP Authentication support.
#####################################################################
if(WITH_LDAP)
- find_package(Ldap)
- if(LDAP_FOUND)
- message(STATUS "Enabling LDAP authentication support")
- set(HAVE_LDAP true)
- if(HAVE_LDAP)
- add_definitions(-DHAVE_LDAP)
- endif(HAVE_LDAP)
- else(LDAP_FOUND)
- message(STATUS "Disabling LDAP authentication support")
- endif(LDAP_FOUND)
+ find_package(Ldap)
+ if(LDAP_FOUND)
+ message(STATUS "Enabling LDAP authentication support")
+ set(HAVE_LDAP true)
+ if(HAVE_LDAP)
+ add_definitions(-DHAVE_LDAP)
+ endif(HAVE_LDAP)
+ else(LDAP_FOUND)
+ message(STATUS "Disabling LDAP authentication support")
+ endif(LDAP_FOUND)
else(WITH_LDAP)
- message(STATUS "Not enabling LDAP authentication support")
+ message(STATUS "Not enabling LDAP authentication support")
endif(WITH_LDAP)
# Setup KDE / KDE Frameworks
default:
qWarning() << "Certificate digest version" << QString(knownDigestVersion) << "is not supported";
}
-
+
if (knownDigest != calculatedDigest) {
bool accepted = false;
bool permanently = false;
struct ClientRegistered : public HandshakeMessage
{
- inline ClientRegistered(quint32 coreFeatures, bool coreConfigured, const QVariantList &backendInfo, const QVariantList &authBackendInfo, bool sslSupported)
+ inline ClientRegistered(quint32 coreFeatures, bool coreConfigured, const QVariantList &backendInfo, bool sslSupported, const QVariantList &authBackendInfo)
: coreFeatures(coreFeatures)
, coreConfigured(coreConfigured)
, backendInfo(backendInfo)
quint32 coreFeatures;
bool coreConfigured;
-
+
// The authBackendInfo should be optional!
QVariantList backendInfo; // TODO: abstract this better
QVariantList authBackendInfo;
-
+
// this is only used by the LegacyProtocol in compat mode
bool sslSupported;
};
struct SetupData : public HandshakeMessage
{
- inline SetupData(const QString &adminUser, const QString &adminPassword, const QString &backend, const QString &authenticator, const QVariantMap &setupData, const QVariantMap &authSetupData)
- : adminUser(adminUser), adminPassword(adminPassword), backend(backend), authenticator(authenticator), setupData(setupData), authSetupData(authSetupData) {}
+ inline SetupData(const QString &adminUser, const QString &adminPassword, const QString &backend,
+ const QVariantMap &setupData, const QString &authenticator = QString(),
+ const QVariantMap &authSetupData = QVariantMap())
+ : adminUser(adminUser)
+ , adminPassword(adminPassword)
+ , backend(backend)
+ , setupData(setupData)
+ , authenticator(authenticator)
+ , authSetupData(authSetupData)
+ {}
QString adminUser;
QString adminPassword;
QString backend;
- QString authenticator;
QVariantMap setupData;
- QVariantMap authSetupData;
+ QString authenticator;
+ QVariantMap authSetupData;
};
}
else if (msgType == "ClientInitAck") {
- handle(ClientRegistered(m["CoreFeatures"].toUInt(), m["Configured"].toBool(), m["StorageBackends"].toList(), m["AuthBackends"].toList(), false)); // SupportsSsl is obsolete
+ handle(ClientRegistered(m["CoreFeatures"].toUInt(), m["Configured"].toBool(), m["StorageBackends"].toList(), false, m["AuthBackends"].toList())); // SupportsSsl obsolete
}
else if (msgType == "CoreSetupData") {
QVariantMap map = m["SetupData"].toMap();
- handle(SetupData(map["AdminUser"].toString(), map["AdminPasswd"].toString(), map["Backend"].toString(), map["AuthBackend"].toString(), map["ConnectionProperties"].toMap(), map["AuthProperties"].toMap()));
+ handle(SetupData(map["AdminUser"].toString(), map["AdminPasswd"].toString(), map["Backend"].toString(), map["ConnectionProperties"].toMap(), map["AuthBackend"].toString(), map["AuthProperties"].toMap()));
}
else if (msgType == "CoreSetupReject") {
// XXX: make these optional using core features.
map["AuthBackend"] = msg.authenticator;
map["AuthProperties"] = msg.authSetupData;
-
+
QVariantMap m;
m["MsgType"] = "CoreSetupData";
m["SetupData"] = map;
socket()->setProperty("UseCompression", true);
#endif
- handle(ClientRegistered(m["CoreFeatures"].toUInt(), m["Configured"].toBool(), m["StorageBackends"].toList(), m["AuthBackends"].toList(), m["SupportSsl"].toBool()));
+ handle(ClientRegistered(m["CoreFeatures"].toUInt(), m["Configured"].toBool(), m["StorageBackends"].toList(), m["SupportSsl"].toBool(), m["AuthBackends"].toList()));
}
else if (msgType == "CoreSetupData") {
QVariantMap map = m["SetupData"].toMap();
- handle(SetupData(map["AdminUser"].toString(), map["AdminPasswd"].toString(), map["Backend"].toString(), map["AuthBackend"].toString(), map["ConnectionProperties"].toMap(), map["AuthProperties"].toMap()));
+ handle(SetupData(map["AdminUser"].toString(), map["AdminPasswd"].toString(), map["Backend"].toString(), map["ConnectionProperties"].toMap(), map["AuthBackend"].toString(), map["AuthProperties"].toMap()));
}
else if (msgType == "CoreSetupReject") {
CustomRateLimits = 0x0080, /// IRC server custom message rate limits
DccFileTransfer = 0x0100,
AwayFormatTimestamp = 0x0200, /// Timestamp formatting in away (e.g. %%hh:mm%%)
+ // Whether or not the core supports auth backends.
+ AuthBackends = 0x0400,
- NumFeatures = 0x0200
+ NumFeatures = 0x0400
};
Q_DECLARE_FLAGS(Features, Feature)
set(SOURCES
abstractsqlstorage.cpp
- authenticator.cpp
+ authenticator.cpp
core.cpp
corealiasmanager.cpp
coreapplication.cpp
#include "types.h"
class Authenticator : public QObject {
-
- Q_OBJECT
-
+
+ Q_OBJECT
+
public:
Authenticator(QObject *parent = 0);
virtual ~Authenticator() {};
enum State {
- IsReady, // ready to go
- NeedsSetup, // need basic setup (ask the user for input)
- NotAvailable // remove the authenticator backend from the list of avaliable authenticators.
+ IsReady, // ready to go
+ NeedsSetup, // need basic setup (ask the user for input)
+ NotAvailable // remove the authenticator backend from the list of avaliable authenticators.
};
public slots:
- // General
-
+ // General
+
//! Check if the authenticator type is available.
/** An authenticator subclass should return true if it can be successfully used, i.e. if all
* prerequisites are in place.
//! Returns the display name of the authenticator backend
/** \return A string that can be used by the client to name the authenticator backend */
virtual QString displayName() const = 0;
-
+
//! Returns a description of this authenticator backend
/** \return A string that can be displayed by the client to describe the authenticator */
virtual QString description() const = 0;
* \return A valid UserId if the password matches the username; 0 else
*/
virtual UserId validateUser(const QString &user, const QString &password) = 0;
-
+
private:
-
+
};
-
-#endif
\ No newline at end of file
+
+#endif
}
registerStorageBackends();
- registerAuthenticatorBackends();
-
+ registerAuthenticatorBackends();
+
connect(&_storageSyncTimer, SIGNAL(timeout()), this, SLOT(syncStorage()));
_storageSyncTimer.start(10 * 60 * 1000); // 10 minutes
}
QVariantMap dbsettings = cs.storageSettings().toMap();
_configured = initStorage(dbsettings.value("Backend").toString(), dbsettings.value("ConnectionProperties").toMap());
- // Not entirely sure what is 'legacy' about the above, but it seems to be the way things work!
- QVariantMap authSettings = cs.authSettings().toMap();
- initAuthenticator(authSettings.value("AuthBackend").toString(), authSettings.value("ConnectionProperties").toMap());
-
+ // Not entirely sure what is 'legacy' about the above, but it seems to be the way things work!
+ QVariantMap authSettings = cs.authSettings().toMap();
+ initAuthenticator(authSettings.value("AuthBackend").toString(), authSettings.value("ConnectionProperties").toMap());
+
if (Quassel::isOptionSet("select-backend")) {
selectBackend(Quassel::optionValue("select-backend"));
exit(0);
}
-
+
// TODO: add --select-authenticator command line option and code.
if (!_configured) {
return tr("Could not setup storage!");
}
+ quInfo() << "Selected authenticator: " << authBackend;
+ if (!(_configured = initAuthenticator(authBackend, authSetupData, true)))
+ {
+ return tr("Could not setup authenticator!");
+ }
+
if (!saveBackendSettings(backend, setupData)) {
return tr("Could not save backend settings, probably a permission problem.");
}
void Core::registerAuthenticatorBackends()
{
// Register new authentication backends here!
- registerAuthenticatorBackend(new SqlAuthenticator(this));
+ registerAuthenticatorBackend(new SqlAuthenticator(this));
#ifdef HAVE_LDAP
registerAuthenticatorBackend(new LdapAuthenticator(this));
#endif
-
+
}
bool Core::registerAuthenticatorBackend(Authenticator *authenticator)
{
- if (authenticator->isAvailable())
- {
- _authenticatorBackends[authenticator->displayName()] = authenticator;
- return true;
- } else {
- authenticator->deleteLater();
- return false;
- }
+ if (authenticator->isAvailable())
+ {
+ _authenticatorBackends[authenticator->displayName()] = authenticator;
+ return true;
+ } else {
+ authenticator->deleteLater();
+ return false;
+ }
}
void Core::unregisterAuthenticatorBackends()
{
- foreach(Authenticator* a, _authenticatorBackends.values())
- {
- a->deleteLater();
- }
- _authenticatorBackends.clear();
+ foreach(Authenticator* a, _authenticatorBackends.values())
+ {
+ a->deleteLater();
+ }
+ _authenticatorBackends.clear();
}
void Core::unregisterAuthenticatorBackend(Authenticator *backend)
{
- _authenticatorBackends.remove(backend->displayName());
- backend->deleteLater();
+ _authenticatorBackends.remove(backend->displayName());
+ backend->deleteLater();
}
// old db settings:
bool Core::initAuthenticator(const QString &backend, const QVariantMap &settings, bool setup)
{
_authenticator = 0;
-
+
if (backend.isEmpty()) {
return false;
}
-
+
Authenticator *authenticator = 0;
if (_authenticatorBackends.contains(backend)) {
authenticator = _authenticatorBackends[backend];
unregisterAuthenticatorBackends();
}
_authenticator = authenticator;
- return true;
+ return true;
}
void Core::syncStorage()
static inline UserId authenticateUser(const QString &userName, const QString &password) {
return instance()->_authenticator->validateUser(userName, password);
}
-
+
//! Add a new user, exposed so auth providers can call this without being the storage.
/**
* \param userName The user's login name
bool initStorage(const QString &backend, const QVariantMap &settings, bool setup = false);
bool initAuthenticator(const QString &backend, const QVariantMap &settings, bool setup = false);
-
+
void socketError(QAbstractSocket::SocketError err, const QString &errorString);
void setupClientSession(RemotePeer *, UserId);
bool registerStorageBackend(Storage *);
void unregisterStorageBackends();
void unregisterStorageBackend(Storage *);
-
+
void registerAuthenticatorBackends();
bool registerAuthenticatorBackend(Authenticator *);
void unregisterAuthenticatorBackends();
void unregisterAuthenticatorBackend(Authenticator *);
-
+
bool selectBackend(const QString &backend);
bool createUser();
bool saveBackendSettings(const QString &backend, const QVariantMap &settings);
}
QVariantList backends;
- QVariantList authenticators;
+ QVariantList authenticators;
bool configured = Core::isConfigured();
if (!configured)
- {
+ {
backends = Core::backendInfo();
- authenticators = Core::authenticatorInfo();
- }
+ authenticators = Core::authenticatorInfo();
+ }
// useSsl is only used for the legacy protocol
- _peer->dispatch(ClientRegistered(Quassel::features(), configured, backends, authenticators, useSsl));
+ // XXX: FIXME: use client features here: we cannot pass authenticators if the client is too old!
+ _peer->dispatch(ClientRegistered(Quassel::features(), configured, backends, useSsl, authenticators));
if (_legacy && useSsl)
startSsl();
if (!checkClientRegistered())
return;
- QString result = Core::setup(msg.adminUser, msg.adminPassword, msg.backend, msg.setupData, msg.authenticator, msg.authSetupData);
+ // The default parameter to authBackend is Database.
+ // Maybe this should be hardcoded elsewhere, i.e. as a define.
+ QString authBackend = msg.authenticator;
+ quInfo() << "[" << authBackend << "]";
+ if (authBackend.trimmed().isEmpty() || authBackend == 0)
+ {
+ authBackend = QString("Database");
+ }
+
+ QString result = Core::setup(msg.adminUser, msg.adminPassword, msg.backend, msg.setupData, authBackend, msg.authSetupData);
if (!result.isEmpty())
_peer->dispatch(SetupFailed(result));
else
//UserId uid = Core::validateUser(msg.user, msg.password);
UserId uid = Core::authenticateUser(msg.user, msg.password);
-
- // Try doing direct database auth if the provider failed, first.
- if (uid == 0) {
- uid = Core::validateUser(msg.user, msg.password);
- }
-
+
+ // Try doing direct database auth if the provider failed, first.
+ if (uid == 0) {
+ uid = Core::validateUser(msg.user, msg.password);
+ }
+
if (uid == 0) {
quInfo() << qPrintable(tr("Invalid login attempt from %1 as \"%2\"").arg(socket()->peerAddress().toString(), msg.user));
_peer->dispatch(LoginFailed(tr("<b>Invalid username or password!</b><br>The username/password combination you supplied could not be found in the database.")));
QVariant CoreSettings::authSettings(const QVariant &def)
{
- return localValue("AuthSettings", def);
+ return localValue("AuthSettings", def);
}
void CoreSettings::setAuthSettings(const QVariant &data)
{
- setLocalValue("AuthSettings", data);
-}
+ setLocalValue("AuthSettings", data);
+}
// FIXME remove
QVariant CoreSettings::oldDbSettings()
void setStorageSettings(const QVariant &data);
QVariant storageSettings(const QVariant &def = QVariant());
- void setAuthSettings(const QVariant &data);
- QVariant authSettings(const QVariant &def = QVariant());
+ void setAuthSettings(const QVariant &data);
+ QVariant authSettings(const QVariant &def = QVariant());
QVariant oldDbSettings(); // FIXME remove
/* This file contains an implementation of an LDAP Authenticator, as an example
* of what a custom external auth provider could do.
- *
+ *
* It's based off of this pull request for quassel by abustany:
* https://github.com/quassel/quassel/pull/4/
- *
+ *
*/
#include "ldapauthenticator.h"
LdapAuthenticator::LdapAuthenticator(QObject *parent)
: Authenticator(parent),
- _connection(0)
+ _connection(0)
{
}
LdapAuthenticator::~LdapAuthenticator()
{
- if (_connection != 0)
- {
- ldap_unbind_ext(_connection, 0, 0);
+ if (_connection != 0)
+ {
+ ldap_unbind_ext(_connection, 0, 0);
}
}
_hostName = properties["Hostname"].toString();
_port = properties["Port"].toInt();
_baseDN = properties["Base DN"].toString();
- _filter = properties["Filter"].toString();
+ _filter = properties["Filter"].toString();
_bindDN = properties["Bind DN"].toString();
_bindPassword = properties["Bind Password"].toString();
_uidAttribute = properties["UID Attribute"].toString();
// through the default core method.
UserId LdapAuthenticator::validateUser(const QString &username, const QString &password)
{
- bool result = ldapAuth(username, password);
- if (!result)
- {
- return UserId();
- }
-
- // If auth succeeds, but the user has not logged into quassel previously, make
- // a new user for them and return that ID.
- // Users created via LDAP have empty usernames.
- UserId quasselID = Core::validateUser(username, QString());
- if (!quasselID.isValid())
- {
- return Core::addUser(username, QString());
- }
- return quasselID;
+ bool result = ldapAuth(username, password);
+ if (!result)
+ {
+ return UserId();
+ }
+
+ // If auth succeeds, but the user has not logged into quassel previously, make
+ // a new user for them and return that ID.
+ // Users created via LDAP have empty usernames.
+ UserId quasselID = Core::validateUser(username, QString());
+ if (!quasselID.isValid())
+ {
+ return Core::addUser(username, QString());
+ }
+ return quasselID;
}
bool LdapAuthenticator::setup(const QVariantMap &settings)
{
- setConnectionProperties(settings);
- bool status = ldapConnect();
- return status;
+ setConnectionProperties(settings);
+ bool status = ldapConnect();
+ return status;
}
Authenticator::State LdapAuthenticator::init(const QVariantMap &settings)
{
- setConnectionProperties(settings);
-
- bool status = ldapConnect();
- if (!status)
- {
- quInfo() << qPrintable(displayName()) << "Authenticator cannot connect.";
- return NotAvailable;
- }
-
- quInfo() << qPrintable(displayName()) << "Authenticator is ready.";
- return IsReady;
+ setConnectionProperties(settings);
+
+ bool status = ldapConnect();
+ if (!status)
+ {
+ quInfo() << qPrintable(displayName()) << "Authenticator cannot connect.";
+ return NotAvailable;
+ }
+
+ quInfo() << qPrintable(displayName()) << "Authenticator is ready.";
+ return IsReady;
}
// Method based on abustany LDAP quassel patch.
int res, v = LDAP_VERSION3;
- QString serverURI;
- QByteArray serverURIArray;
-
- // Convert info to hostname:port.
- serverURI = _hostName + ":" + QString::number(_port);
- serverURIArray = serverURI.toLocal8Bit();
+ QString serverURI;
+ QByteArray serverURIArray;
+
+ // Convert info to hostname:port.
+ serverURI = _hostName + ":" + QString::number(_port);
+ serverURIArray = serverURI.toLocal8Bit();
res = ldap_initialize(&_connection, serverURIArray);
if (res != LDAP_SUCCESS) {
int res;
- // Attempt to establish a connection.
+ // Attempt to establish a connection.
if (_connection == 0) {
if (not ldapConnect()) {
return false;
}
struct berval cred;
-
- // Convert some things to byte arrays as needed.
- QByteArray bindPassword = _bindPassword.toLocal8Bit();
- QByteArray bindDN = _bindDN.toLocal8Bit();
- QByteArray baseDN = _baseDN.toLocal8Bit();
- QByteArray uidAttribute = _uidAttribute.toLocal8Bit();
+
+ // Convert some things to byte arrays as needed.
+ QByteArray bindPassword = _bindPassword.toLocal8Bit();
+ QByteArray bindDN = _bindDN.toLocal8Bit();
+ QByteArray baseDN = _baseDN.toLocal8Bit();
+ QByteArray uidAttribute = _uidAttribute.toLocal8Bit();
cred.bv_val = const_cast<char*>(bindPassword.size() > 0 ? bindPassword.constData() : NULL);
cred.bv_len = bindPassword.size();
}
// The original implementation had requiredAttributes. I have not included this code
- // but it would be easy to re-add if someone wants this feature.
+ // but it would be easy to re-add if someone wants this feature.
// Ben Rosser <bjr@acm.jhu.edu> (12/23/15).
-
+
ldap_memfree(userDN);
ldap_msgfree(msg);
- return true;
-}
\ No newline at end of file
+ return true;
+}
/* This file contains an implementation of an LDAP Authenticator, as an example
* of what a custom external auth provider could do.
- *
+ *
* It's based off of this pull request for quassel by abustany:
* https://github.com/quassel/quassel/pull/4/
- *
+ *
*/
#ifndef LDAPAUTHENTICATOR_H
QString description() const;
virtual QStringList setupKeys() const;
virtual QVariantMap setupDefaults() const;
-
+
bool setup(const QVariantMap &settings = QVariantMap());
State init(const QVariantMap &settings = QVariantMap());
UserId validateUser(const QString &user, const QString &password);
-
+
protected:
virtual void setConnectionProperties(const QVariantMap &properties);
bool ldapConnect();
int _port;
QString _bindDN;
QString _baseDN;
- QString _filter;
+ QString _filter;
QString _bindPassword;
QString _uidAttribute;
- // The actual connection object.
- LDAP *_connection;
-
+ // The actual connection object.
+ LDAP *_connection;
+
};
bool SqlAuthenticator::setup(const QVariantMap &settings)
{
- return true;
+ return true;
}
Authenticator::State SqlAuthenticator::init(const QVariantMap &settings)
{
- // TODO: FIXME: this should check if the storage provider is ready, but I don't
- // know if there's an exposed way to do that at the moment.
-
- quInfo() << qPrintable(displayName()) << "Authenticator is ready.";
- return IsReady;
-}
\ No newline at end of file
+ // TODO: FIXME: this should check if the storage provider is ready, but I don't
+ // know if there's an exposed way to do that at the moment.
+
+ quInfo() << qPrintable(displayName()) << "Authenticator is ready.";
+ return IsReady;
+}
bool setup(const QVariantMap &settings = QVariantMap());
State init(const QVariantMap &settings = QVariantMap());
UserId validateUser(const QString &user, const QString &password);
-
+
/* User handling */
//virtual UserId getUserId(const QString &username);
#include "coreconfigwizard.h"
#include "coreconnection.h"
+#include "client.h"
+
CoreConfigWizard::CoreConfigWizard(CoreConnection *connection, const QList<QVariant> &backends, const QList<QVariant> &authenticators, QWidget *parent)
: QWizard(parent),
_connection(connection)
foreach(const QVariant &v, backends)
_backends[v.toMap()["DisplayName"].toString()] = v;
-
+
foreach(const QVariant &v, authenticators)
_authenticators[v.toMap()["DisplayName"].toString()] = v;
setPage(AuthenticationSelectionPage, new CoreConfigWizardPages::AuthenticationSelectionPage(_authenticators, this));
setPage(StorageSelectionPage, new CoreConfigWizardPages::StorageSelectionPage(_backends, this));
syncPage = new CoreConfigWizardPages::SyncPage(this);
- connect(syncPage, SIGNAL(setupCore(const QString &, const QVariantMap &, const QString &, const QVariantMap &)),
- SLOT(prepareCoreSetup(const QString &, const QVariantMap &, const QString &, const QVariantMap &)));
+ connect(syncPage, SIGNAL(setupCore(const QString &, const QVariantMap &, const QString &, const QVariantMap &)),
+ SLOT(prepareCoreSetup(const QString &, const QVariantMap &, const QString &, const QVariantMap &)));
setPage(SyncPage, syncPage);
syncRelayPage = new CoreConfigWizardPages::SyncRelayPage(this);
connect(syncRelayPage, SIGNAL(startOver()), this, SLOT(startOver()));
QHash<QString, QVariant> CoreConfigWizard::authenticators() const
{
- return _authenticators;
+ return _authenticators;
}
void CoreConfigWizard::prepareCoreSetup(const QString &backend, const QVariantMap &properties, const QString &authBackend, const QVariantMap &authProperties)
foreach(int idx, visitedPages())
page(idx)->setEnabled(false);
- coreConnection()->setupCore(Protocol::SetupData(field("adminUser.user").toString(), field("adminUser.password").toString(), backend, authBackend, properties, authProperties));
+ // FIXME? We need to be able to set up older cores that don't have auth backend support.
+ // So if the core doesn't support that feature, don't pass those parameters.
+ if (!(Client::coreFeatures() & Quassel::AuthBackends))
+ {
+ coreConnection()->setupCore(Protocol::SetupData(field("adminUser.user").toString(), field("adminUser.password").toString(), backend, properties));
+ } else {
+ coreConnection()->setupCore(Protocol::SetupData(field("adminUser.user").toString(), field("adminUser.password").toString(), backend, properties, authBackend, authProperties));
+ }
}
int AdminUserPage::nextId() const
{
- return CoreConfigWizard::AuthenticationSelectionPage;
+ // If the core doesn't support auth backends, skip that page!
+ if (!(Client::coreFeatures() & Quassel::AuthBackends))
+ {
+ return CoreConfigWizard::StorageSelectionPage;
+ } else {
+ return CoreConfigWizard::AuthenticationSelectionPage;
+ }
}
complete = false;
hasError = false;
- // Fill in sync info about the storage layer.
+ // Fill in sync info about the storage layer.
StorageSelectionPage *storagePage = qobject_cast<StorageSelectionPage *>(wizard()->page(CoreConfigWizard::StorageSelectionPage));
QString backend = storagePage->selectedBackend();
QVariantMap properties = storagePage->connectionProperties();
- Q_ASSERT(!backend.isEmpty());
+ Q_ASSERT(!backend.isEmpty());
ui.backend->setText(backend);
-
- // Fill in synci nfo about the authentication layer.
- AuthenticationSelectionPage *authPage = qobject_cast<AuthenticationSelectionPage *>(wizard()->page(CoreConfigWizard::AuthenticationSelectionPage));
- QString authBackend = authPage->selectedBackend();
+
+ // Fill in sync info about the authentication layer.
+ AuthenticationSelectionPage *authPage = qobject_cast<AuthenticationSelectionPage *>(wizard()->page(CoreConfigWizard::AuthenticationSelectionPage));
+ QString authBackend = authPage->selectedBackend();
QVariantMap authProperties = authPage->connectionProperties();
- Q_ASSERT(!authBackend.isEmpty());
+ Q_ASSERT(!authBackend.isEmpty());
ui.authBackend->setText(authBackend);
ui.user->setText(wizard()->field("adminUser.user").toString());
- emit setupCore(backend, properties, authBackend, authProperties);
+ emit setupCore(backend, properties, authBackend, authProperties);
}
int nextId() const;
QString selectedBackend() const;
QVariantMap connectionProperties() const;
-
+
private slots:
void on_backendList_currentIndexChanged();
private:
</widget>
</item>
<item row="2" column="0" >
- <widget class="QLabel" name="label_2" >
+ <widget class="QLabel" name="label_3" >
<property name="font" >
<font>
<weight>75</weight>