refs #751, info if user can directly update models

* modified login component, give hints
* user object has flag for direct write
This commit is contained in:
Klaus Basan
2016-08-31 17:14:32 +02:00
committed by Roland Winklmeier
parent 03c642d88a
commit ced9f5294e
5 changed files with 372 additions and 271 deletions

View File

@@ -101,6 +101,11 @@ namespace BlackMisc
return this->hasRole("MAPPINGADMIN") || this->isAdmin();
}
bool CAuthenticatedUser::canDirectlyWriteModels() const
{
return this->isAdmin() || this->isMappingAdmin();
}
CIcon CAuthenticatedUser::toIcon() const
{
return CIconList::iconByIndex(CIcons::StandardIconUser16);

View File

@@ -139,6 +139,9 @@ namespace BlackMisc
//! Enabled
bool isEnabled() const { return this->m_enabled; }
//! Entitled to directly update models
bool canDirectlyWriteModels() const;
//! \copydoc BlackMisc::Mixin::Icon::toIcon()
BlackMisc::CIcon toIcon() const;