From 439cf9de7afe8e97c1c2c81caeecfdc587944866 Mon Sep 17 00:00:00 2001 From: Kathy Date: Tue, 26 Jul 2022 10:41:38 +0000 Subject: [PATCH] B2022-080 Cannot add a new group in Proms security --- PROMS/VEPROMS User Interface/dlgManageSecurity.cs | 8 ++++++++ 1 file changed, 8 insertions(+) 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)