mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
refs #485, renamed the trait for authenticated user to AuthenticatedDbUser
* there is no single authenticated user, this one has a specific usage * adjusted classed * formatting
This commit is contained in:
committed by
Mathew Sutcliffe
parent
f27d130df9
commit
55a0ab7b48
@@ -19,9 +19,9 @@ namespace BlackGui
|
||||
|
||||
CForm::~CForm() { }
|
||||
|
||||
const BlackMisc::Network::CAuthenticatedUser &CForm::getUser() const
|
||||
const BlackMisc::Network::CAuthenticatedUser &CForm::getSwiftDbUser() const
|
||||
{
|
||||
return this->m_user.get();
|
||||
return this->m_swiftDbUser.get();
|
||||
}
|
||||
|
||||
void CForm::ps_userChanged()
|
||||
|
||||
@@ -46,11 +46,11 @@ namespace BlackGui
|
||||
bool isReadOnly() const { return m_readOnly; }
|
||||
|
||||
//! Authenticated user
|
||||
const BlackMisc::Network::CAuthenticatedUser &getUser() const;
|
||||
const BlackMisc::Network::CAuthenticatedUser &getSwiftDbUser() const;
|
||||
|
||||
protected:
|
||||
bool m_readOnly = false; //!< read only
|
||||
BlackMisc::CData<BlackCore::Data::AuthenticatedUser> m_user {this, &CForm::ps_userChanged}; //!< authenticated user
|
||||
BlackMisc::CData<BlackCore::Data::AuthenticatedDbUser> m_swiftDbUser {this, &CForm::ps_userChanged}; //!< authenticated user
|
||||
|
||||
protected slots:
|
||||
//! User has been changed
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace BlackGui
|
||||
|
||||
void CModelMappingForm::ps_userChanged()
|
||||
{
|
||||
const CAuthenticatedUser user(this->getUser());
|
||||
const CAuthenticatedUser user(this->getSwiftDbUser());
|
||||
if (user.isAdmin())
|
||||
{
|
||||
ui->selector_ModelMode->setValue(CAircraftModel::Include);
|
||||
|
||||
Reference in New Issue
Block a user