B2022-080 Cannot add a new group in Proms security

This commit is contained in:
Kathy Ruffing 2022-07-26 10:41:38 +00:00
parent b046b13a67
commit 439cf9de7a

View File

@ -290,6 +290,14 @@ namespace VEPROMS
{
txt = txt.Replace("Create", "").Replace(" a ", "").Replace("Group", "").Trim();
RoleInfoList ril = RoleInfoList.Get();
// B2022-080: cannot add a new group in Proms security. if the sql database's 'Roles' table was not initialized with the default roles, such as Set Administrator,
// Writer, Reviewer, RO Editor, the Adding of new groups won't work. Databases should have this loaded by default.
// Promsfixes has queries that insert these, but only gets run if there are no assignments (see commands under --define Roles)
if (ril == null || ril.Count < 2)
{
MessageBox.Show("Roles table is missing entries.\r\nPlease contact Volian to create other groups.", "Cannot create groups", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
foreach(RoleInfo ri in ril)
{
if (ri.Name == txt)