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:
Klaus Basan
2016-10-18 20:19:49 +02:00
parent 80bbed96d4
commit 592e330278
5 changed files with 149 additions and 65 deletions

View File

@@ -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;