Ref T53, "bulkadd" role in UI/user

This commit is contained in:
Klaus Basan
2017-05-03 03:41:10 +02:00
committed by Mathew Sutcliffe
parent 66e729b090
commit 6fc48ab160
3 changed files with 10 additions and 2 deletions

View File

@@ -477,7 +477,7 @@ namespace BlackGui
}
else if (user.canDirectlyWriteModels())
{
ui->pb_Publish->setText("Publish (direct)");
ui->pb_Publish->setText("Publish (dir.)");
ui->pb_Publish->setToolTip("Models directly released");
ui->pb_Publish->setEnabled(true);
}

View File

@@ -112,9 +112,14 @@ namespace BlackMisc
return this->hasRole("BULK");
}
bool CAuthenticatedUser::hasBulkAddRole() const
{
return this->hasRole("BULKADD");
}
bool CAuthenticatedUser::canDirectlyWriteModels() const
{
return this->hasBulkRole();
return this->hasBulkRole() || this->hasBulkAddRole();
}
CIcon CAuthenticatedUser::toIcon() const

View File

@@ -137,6 +137,9 @@ namespace BlackMisc
//! Has bulk role?
bool hasBulkRole() const;
//! Has bulk add role?
bool hasBulkAddRole() const;
//! Authenticated
void setAuthenticated(bool authenticated) { m_authenticated = authenticated; }