Skip to content

Commit e43fc12

Browse files
committed
OTC-8: Added User Profile rights to IMIS Administrator (migration)
1 parent 39c306b commit e43fc12

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

Migration script/openIMIS migration latest.sql

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5113,7 +5113,7 @@ BEGIN
51135113
/*Error Codes
51145114
2- Not valid insurance or missing product code
51155115
3- Not valid enrolment officer code
5116-
4 –Enrolment officer code and insurance product code are not compatible
5116+
4- Enrolment officer code and insurance product code are not compatible
51175117
5- Beneficiary has no policy of specified insurance product for renewal
51185118
6- Can not issue a control number as default indicated prior enrollment and Insuree has not been enrolled yet
51195119
@@ -5776,3 +5776,15 @@ BEGIN
57765776
SELECT DATEADD(DAY, -1, @LastDate) LastDate;
57775777
END
57785778
GO
5779+
5780+
-- OTC-8: Authorisation doesn't work properly
5781+
-- Adds user profile rights to IMIS Administrator
5782+
5783+
DECLARE @SystemRole INT
5784+
SELECT @SystemRole = role.RoleID from tblRole role where IsSystem=64; --IMIS Administrator
5785+
5786+
INSERT INTO [dbo].[tblRoleRight] ([RoleID], [RightID], [ValidityFrom], [ValidityTo], [AuditUserId], [LegacyID])
5787+
SELECT @SystemRole, RightIDToAdd, CURRENT_TIMESTAMP, NULL, NULL, NULL
5788+
FROM ( values (122000), (122001), (122002), (122003), (122004), (122005)) as RightsToAdd (RightIDToAdd)) -- User Profile Rights
5789+
WHERE NOT EXISTS (SELECT TOP (1) * FROM [dbo].[tblRoleRight] WHERE [RoleID]=@SystemRole AND [RightID]=RightIDToAdd)
5790+
GO

0 commit comments

Comments
 (0)