Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
prv-proton committed Jan 3, 2025
1 parent 1324a4a commit 6b62173
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions etl/nifi_scripts/user.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def userRoleQuery = """
GROUP BY user_profile_id, organization_id
),
ProcessedRoles AS (
SELECT
SELECT
user_profile_id,
CASE
-- Rule 1: Government Users
Expand Down Expand Up @@ -88,9 +88,9 @@ def userRoleQuery = """
-- Rule 2: Supplier Users
WHEN organization_id > 1 THEN
CASE
-- Remove government roles and retain Read Only if it exists
-- Return empty array if READ_ONLY exists
WHEN 'READ_ONLY' = ANY(roles) THEN
ARRAY['READ_ONLY']
ARRAY[]::text[]
ELSE ARRAY(
SELECT UNNEST(roles)
EXCEPT
Expand Down

0 comments on commit 6b62173

Please sign in to comment.