mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
refs #769, use role bulk to decide if user can directly write models
* renamed role functions * renamed buttons * some formatting
This commit is contained in:
committed by
Mathew Sutcliffe
parent
3a7c9626d3
commit
7446ffcb80
@@ -98,19 +98,24 @@ namespace BlackMisc
|
||||
return msgs;
|
||||
}
|
||||
|
||||
bool CAuthenticatedUser::isAdmin() const
|
||||
bool CAuthenticatedUser::hasAdminRole() const
|
||||
{
|
||||
return this->hasRole("ADMIN");
|
||||
}
|
||||
|
||||
bool CAuthenticatedUser::isMappingAdmin() const
|
||||
bool CAuthenticatedUser::hasMappingAdminRole() const
|
||||
{
|
||||
return this->hasRole("MAPPINGADMIN") || this->isAdmin();
|
||||
return this->hasRole("MAPPINGADMIN");
|
||||
}
|
||||
|
||||
bool CAuthenticatedUser::hasBulkRole() const
|
||||
{
|
||||
return this->hasRole("BULK");
|
||||
}
|
||||
|
||||
bool CAuthenticatedUser::canDirectlyWriteModels() const
|
||||
{
|
||||
return this->isAdmin() || this->isMappingAdmin();
|
||||
return this->hasBulkRole();
|
||||
}
|
||||
|
||||
CIcon CAuthenticatedUser::toIcon() const
|
||||
|
||||
@@ -129,10 +129,13 @@ namespace BlackMisc
|
||||
void setCountry(const BlackMisc::CCountry &country) { m_country = country; }
|
||||
|
||||
//! Admin?
|
||||
bool isAdmin() const;
|
||||
bool hasAdminRole() const;
|
||||
|
||||
//! Admin?
|
||||
bool isMappingAdmin() const;
|
||||
bool hasMappingAdminRole() const;
|
||||
|
||||
//! Has bulk role?
|
||||
bool hasBulkRole() const;
|
||||
|
||||
//! Authenticated
|
||||
void setAuthenticated(bool authenticated) { m_authenticated = authenticated; }
|
||||
|
||||
Reference in New Issue
Block a user