Skip to content

Commit d934d20

Browse files
authored
Finish feature/OTC-8
OTC-8: Authorisation doesn't work properly
2 parents e4e94b0 + d9f3808 commit d934d20

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

Migration script/openIMIS migration latest.sql

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5178,7 +5178,7 @@ BEGIN
51785178
/*Error Codes
51795179
2- Not valid insurance or missing product code
51805180
3- Not valid enrolment officer code
5181-
4Enrolment officer code and insurance product code are not compatible
5181+
4- Enrolment officer code and insurance product code are not compatible
51825182
5- Beneficiary has no policy of specified insurance product for renewal
51835183
6- Can not issue a control number as default indicated prior enrollment and Insuree has not been enrolled yet
51845184
@@ -5842,6 +5842,20 @@ BEGIN
58425842
END
58435843
GO
58445844

5845+
-- OTC-8: Authorisation doesn't work properly
5846+
-- Adds user profile rights to IMIS Administrator
5847+
5848+
DECLARE @SystemRole INT
5849+
SELECT @SystemRole = role.RoleID from tblRole role where IsSystem=64; --IMIS Administrator
5850+
5851+
INSERT INTO [dbo].[tblRoleRight] ([RoleID], [RightID], [ValidityFrom], [ValidityTo], [AuditUserId], [LegacyID])
5852+
SELECT @SystemRole, RightIDToAdd, CURRENT_TIMESTAMP, NULL, NULL, NULL
5853+
FROM ( values (122000), (122001), (122002), (122003), (122004), (122005)) as RightsToAdd (RightIDToAdd)) -- User Profile Rights
5854+
WHERE NOT EXISTS (SELECT TOP (1) * FROM [dbo].[tblRoleRight] WHERE [RoleID]=@SystemRole AND [RightID]=RightIDToAdd)
5855+
GO
5856+
5857+
-- end of OTC-8
5858+
58455859
IF OBJECT_ID('uspAddInsureePolicy', 'P') IS NOT NULL
58465860
DROP PROCEDURE [uspAddInsureePolicy]
58475861
GO
@@ -6328,5 +6342,4 @@ BEGIN
63286342
TotalAdjusted
63296343
FROM tblCapitationPayment WHERE [year] = @Year AND [month] = @Month AND HfID in (SELECT id from @listOfHF) AND @ProdId = ProductID;
63306344
END
6331-
6332-
GO
6345+
GO

0 commit comments

Comments
 (0)