diff --git a/PROMS/VEPROMS User Interface/dlgManageSecurity.cs b/PROMS/VEPROMS User Interface/dlgManageSecurity.cs index 4ce67797..54f2bf58 100644 --- a/PROMS/VEPROMS User Interface/dlgManageSecurity.cs +++ b/PROMS/VEPROMS User Interface/dlgManageSecurity.cs @@ -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)