Skip to content

Commit

Permalink
Merge pull request #1591 from Crown-Commercial-Service/feature/5029-C…
Browse files Browse the repository at this point in the history
…ON-3730-Role-changes-Backend-API-call-user-profile-changes

PR-5029 con 3730 role changes backend api call user profile changes
  • Loading branch information
ponselvamsakthivel-bc authored Mar 30, 2023
2 parents 7596b10 + b08301b commit cb18069
Show file tree
Hide file tree
Showing 15 changed files with 85 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ SELECT Assign_Service_To_Org_User_Group('CAT_USER','Contract Award Service (CAS)
SELECT Assign_Service_To_Org_User_Group('CAT_USER','Contract Award Service (CAS) - add service','CAT_USER','Contract Award Service role to create buyer in Jagger');
SELECT Assign_Service_To_Org_User_Group('CAT_USER','Contract Award Service (CAS) - add service','CAT_USER','Contract Award Service role to merge buyer via Jaggaer');

SELECT Assign_Service_To_Org_User_Group('JAEGGER_BUYER','eSourcing Service as a buyer','JAEGGER_BUYER','eSourcing buyer role for CAS -Optional');
-- Following Role no longer required. task-5029-con-3730
-- SELECT Assign_Service_To_Org_User_Group('JAEGGER_BUYER','eSourcing Service as a buyer','JAEGGER_BUYER','eSourcing buyer role for CAS -Optional');
SELECT Assign_Service_To_Org_User_Group('JAEGGER_BUYER','eSourcing Service as a buyer','JAEGGER_BUYER','eSourcing Tile for Buyer User');
SELECT Assign_Service_To_Org_User_Group('JAEGGER_BUYER','eSourcing Service as a buyer','JAEGGER_BUYER','eSourcing buyer role to access Jagger');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ if (clientServiceId is null) then
return 1;
end if;

IF EXISTS (SELECT "Id" FROM public."CcsAccessRole" WHERE "CcsAccessRoleNameKey" = 'CAS_USER' AND "CcsAccessRoleName" = 'Contract Award Service (CAS) - add to dashboard' LIMIT 1) THEN
raise notice 'Role already exists';
return 1;
END IF;


INSERT INTO public."ServicePermission"(
"ServicePermissionName", "CcsServiceId", "CreatedUserId", "LastUpdatedUserId", "CreatedOnUtc","LastUpdatedOnUtc", "IsDeleted")
VALUES ('CAS_USER_DS', clientServiceId, 0, 0, now(), now(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ if (clientServiceId is null) then
return 1;
end if;

IF EXISTS (SELECT "Id" FROM public."CcsAccessRole" WHERE "CcsAccessRoleNameKey" = 'CAS_USER' AND "CcsAccessRoleName" = 'Contract Award Service role to create buyer in Jagger-LD' LIMIT 1) THEN
raise notice 'Role already exists';
return 1;
END IF;


INSERT INTO public."ServicePermission"(
"ServicePermissionName", "CcsServiceId", "CreatedUserId", "LastUpdatedUserId", "CreatedOnUtc","LastUpdatedOnUtc", "IsDeleted")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ if (clientServiceId is null) then
return 1;
end if;

IF EXISTS (SELECT "Id" FROM public."CcsAccessRole" WHERE "CcsAccessRoleNameKey" = 'FP_USER' AND "CcsAccessRoleName" = 'Fleet Portal Tile' LIMIT 1) THEN
raise notice 'Role already exists';
return 1;
END IF;


INSERT INTO public."ServicePermission"(
"ServicePermissionName", "CcsServiceId", "CreatedUserId", "LastUpdatedUserId", "CreatedOnUtc","LastUpdatedOnUtc", "IsDeleted")
VALUES ('FP_USER_DS', clientServiceId, 0, 0, now(), now(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ if (clientServiceId is null) then
return 1;
end if;

IF EXISTS (SELECT "Id" FROM public."CcsAccessRole" WHERE "CcsAccessRoleNameKey" = 'JAEGGER_BUYER' AND "CcsAccessRoleName" = 'eSourcing Tile for Buyer User' LIMIT 1) THEN
raise notice 'Role already exists';
return 1;
END IF;


INSERT INTO public."ServicePermission"(
"ServicePermissionName", "CcsServiceId", "CreatedUserId", "LastUpdatedUserId", "CreatedOnUtc","LastUpdatedOnUtc", "IsDeleted")
VALUES ('JAEGGER_BUYER_DS', clientServiceId, 0, 0, now(), now(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ if (clientServiceId is null) then
return 1;
end if;

IF EXISTS (SELECT "Id" FROM public."CcsAccessRole" WHERE "CcsAccessRoleNameKey" = 'JAEGGER_BUYER' AND "CcsAccessRoleName" = 'eSourcing buyer role to access Jagger' LIMIT 1) THEN
raise notice 'Role already exists';
return 1;
END IF;


INSERT INTO public."ServicePermission"(
"ServicePermissionName", "CcsServiceId", "CreatedUserId", "LastUpdatedUserId", "CreatedOnUtc","LastUpdatedOnUtc", "IsDeleted")
VALUES ('JAEGGER_BUYER_ES', clientServiceId, 0, 0, now(), now(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ if (clientServiceId is null) then
return 1;
end if;

IF EXISTS (SELECT "Id" FROM public."CcsAccessRole" WHERE "CcsAccessRoleNameKey" = 'JAEGGER_SUPPLIER' AND "CcsAccessRoleName" = 'eSourcing Supplier role for CAS for QA Pages Access' LIMIT 1) THEN
raise notice 'Role already exists';
return 1;
END IF;


INSERT INTO public."ServicePermission"(
"ServicePermissionName", "CcsServiceId", "CreatedUserId", "LastUpdatedUserId", "CreatedOnUtc","LastUpdatedOnUtc", "IsDeleted")
VALUES ('JAEGGER_SUPPLIER_CAS', clientServiceId, 0, 0, now(), now(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ if (clientServiceId is null) then
return 1;
end if;

IF EXISTS (SELECT "Id" FROM public."CcsAccessRole" WHERE "CcsAccessRoleNameKey" = 'JAEGGER_SUPPLIER' AND "CcsAccessRoleName" = 'eSourcing Tile for Supplier User' LIMIT 1) THEN
raise notice 'Role already exists';
return 1;
END IF;


INSERT INTO public."ServicePermission"(
"ServicePermissionName", "CcsServiceId", "CreatedUserId", "LastUpdatedUserId", "CreatedOnUtc","LastUpdatedOnUtc", "IsDeleted")
VALUES ('JAEGGER_SUPPLIER_DS', clientServiceId, 0, 0, now(), now(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ INSERT INTO public."ServicePermission"(
"ServicePermissionName", "CcsServiceId", "CreatedUserId", "LastUpdatedUserId", "CreatedOnUtc","LastUpdatedOnUtc", "IsDeleted")
VALUES ('JAEGGER_SUPPLIER_ES', clientServiceId, 0, 0, now(), now(), false);

IF EXISTS (SELECT "Id" FROM public."CcsAccessRole" WHERE "CcsAccessRoleNameKey" = 'JAEGGER_SUPPLIER' AND "CcsAccessRoleName" = 'eSourcing Supplier role to access Jagger' LIMIT 1) THEN
raise notice 'Role already exists';
return 1;
END IF;


SELECT "Id" into ServicePermissionId From public."ServicePermission" WHERE "ServicePermissionName" = 'JAEGGER_SUPPLIER_ES' AND "CcsServiceId" = clientServiceId LIMIT 1;

INSERT INTO public."CcsAccessRole"(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ if (clientServiceId is null) then
return 1;
end if;

IF EXISTS (SELECT "Id" FROM public."CcsAccessRole" WHERE "CcsAccessRoleNameKey" = 'DATA_MIGRATION' AND "CcsAccessRoleName" = 'Access Data Migration' LIMIT 1) THEN
raise notice 'Role already exists';
return 1;
END IF;


INSERT INTO public."ServicePermission"(
"ServicePermissionName", "CcsServiceId", "CreatedUserId", "LastUpdatedUserId", "CreatedOnUtc","LastUpdatedOnUtc", "IsDeleted")
VALUES ('DATA_MIGRATION_DS', clientServiceId, 0, 0, now(), now(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ if (clientServiceId is null) then
return 1;
end if;

IF EXISTS (SELECT "Id" FROM public."CcsAccessRole" WHERE "CcsAccessRoleNameKey" = 'DigiTS_USER' AND "CcsAccessRoleName" = 'Access DigiTS' LIMIT 1) THEN
raise notice 'Role already exists';
return 1;
END IF;


INSERT INTO public."ServicePermission"(
"ServicePermissionName", "CcsServiceId", "CreatedUserId", "LastUpdatedUserId", "CreatedOnUtc","LastUpdatedOnUtc", "IsDeleted")
VALUES ('DigiTS_USER_DS', clientServiceId, 0, 0, now(), now(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ if (clientServiceId is null) then
return 1;
end if;

IF EXISTS (SELECT "Id" FROM public."CcsAccessRole" WHERE "CcsAccessRoleNameKey" = 'EL_USER' AND "CcsAccessRoleName" = 'Buyer Supplier Information' LIMIT 1) THEN
raise notice 'Role already exists';
return 1;
END IF;


INSERT INTO public."ServicePermission"(
"ServicePermissionName", "CcsServiceId", "CreatedUserId", "LastUpdatedUserId", "CreatedOnUtc","LastUpdatedOnUtc", "IsDeleted")
VALUES ('EL_USER_DS', clientServiceId, 0, 0, now(), now(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ if (clientServiceId is null) then
return 1;
end if;

IF EXISTS (SELECT "Id" FROM public."CcsAccessRole" WHERE "CcsAccessRoleNameKey" = 'RMI_USER' AND "CcsAccessRoleName" = 'RMI Tile' LIMIT 1) THEN
raise notice 'Role already exists';
return 1;
END IF;


INSERT INTO public."ServicePermission"(
"ServicePermissionName", "CcsServiceId", "CreatedUserId", "LastUpdatedUserId", "CreatedOnUtc","LastUpdatedOnUtc", "IsDeleted")
VALUES ('RMI_USER_DS', clientServiceId, 0, 0, now(), now(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ if (clientServiceId is null) then
return 1;
end if;

IF EXISTS (SELECT "Id" FROM public."CcsAccessRole" WHERE "CcsAccessRoleNameKey" = 'TEST_SAML_CLIENT_USER' AND "CcsAccessRoleName" = 'SAML Client Tile' LIMIT 1) THEN
raise notice 'Role already exists';
return 1;
END IF;


INSERT INTO public."ServicePermission"(
"ServicePermissionName", "CcsServiceId", "CreatedUserId", "LastUpdatedUserId", "CreatedOnUtc","LastUpdatedOnUtc", "IsDeleted")
VALUES ('TEST_SAML_CLIENT_USER_DS', clientServiceId, 0, 0, now(), now(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ if (clientServiceId is null) then
return 1;
end if;

IF EXISTS (SELECT "Id" FROM public."CcsAccessRole" WHERE "CcsAccessRoleNameKey" = 'TEST_SSO_CLIENT_USER' AND "CcsAccessRoleName" = 'SSO Client Tile' LIMIT 1) THEN
raise notice 'Role already exists';
return 1;
END IF;


INSERT INTO public."ServicePermission"(
"ServicePermissionName", "CcsServiceId", "CreatedUserId", "LastUpdatedUserId", "CreatedOnUtc","LastUpdatedOnUtc", "IsDeleted")
VALUES ('TEST_SSO_CLIENT_USER_DS', clientServiceId, 0, 0, now(), now(), false);
Expand Down

0 comments on commit cb18069

Please sign in to comment.