mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
refs #768, authentication component improved
* access to user object * show database name in UI * init UI with user object at startup
This commit is contained in:
@@ -50,6 +50,17 @@ namespace BlackCore
|
||||
this->logoff();
|
||||
}
|
||||
|
||||
CAuthenticatedUser CDatabaseAuthenticationService::getDbUser() const
|
||||
{
|
||||
return this->m_swiftDbUser.get();
|
||||
}
|
||||
|
||||
bool CDatabaseAuthenticationService::isUserAuthenticated() const
|
||||
{
|
||||
const CAuthenticatedUser user(this->getDbUser());
|
||||
return user.isAuthenticated();
|
||||
}
|
||||
|
||||
CStatusMessageList CDatabaseAuthenticationService::login(const QString &username, const QString &password)
|
||||
{
|
||||
CStatusMessageList msgs;
|
||||
|
||||
@@ -39,6 +39,12 @@ namespace BlackCore
|
||||
//! Shutdown
|
||||
void gracefulShutdown();
|
||||
|
||||
//! DB user
|
||||
BlackMisc::Network::CAuthenticatedUser getDbUser() const;
|
||||
|
||||
//! User authenticated
|
||||
bool isUserAuthenticated() const;
|
||||
|
||||
public slots:
|
||||
//! Try to login to authentication web service
|
||||
BlackMisc::CStatusMessageList login(const QString &id, const QString &password);
|
||||
|
||||
Reference in New Issue
Block a user