Skip to content

Commit

Permalink
chore: adjust technical user role documentation (#213)
Browse files Browse the repository at this point in the history
Reviewed-By: Evelyn Gurschler <evelyn.gurschler@bmw.de>
  • Loading branch information
Phil91 authored Dec 6, 2023
1 parent 3a8578a commit 58d5ad3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ NEW portal.onboarding_service_provider_details to safe information of the onboar

#### Technical Role - UPDATE

To align the portal database with the Keycloak database the following SQL must be executed against the portal database. The script will replace the 'Connector User' role with the roles 'Semantic Model Management' and 'Dataspace Discovery'. As well as replace the 'App Tech User' role with 'Semantic Model Management', 'Dataspace Discovery' and 'CX Membership Info'. This results in all identity assigned roles being replaced, all technical user profile assigned roles being updated and the old roles being removed from the database.
To align the portal database with the Keycloak database the following SQL must be executed against the portal database. The script will replace the 'Connector User' role with the roles 'Semantic Model Management', 'Identity Wallet Management' and 'Dataspace Discovery'. As well as replace the 'App Tech User' role with 'Semantic Model Management', 'Dataspace Discovery' and 'CX Membership Info'. This results in all identity assigned roles being replaced, all technical user profile assigned roles being updated and the old roles being removed from the database.

```sql
WITH connector_users AS (
Expand All @@ -123,7 +123,7 @@ connector_roles_to_insert AS (
CROSS JOIN (
SELECT id
FROM portal.user_roles
WHERE user_role IN ('Semantic Model Management', 'Dataspace Discovery')
WHERE user_role IN ('Semantic Model Management', 'Identity Wallet Management', 'Dataspace Discovery')
) AS ur
)
INSERT INTO portal.identity_assigned_roles (identity_id, user_role_id)
Expand Down Expand Up @@ -169,7 +169,7 @@ connector_profiles_to_insert AS (
CROSS JOIN (
SELECT id
FROM portal.user_roles
WHERE user_role IN ('Semantic Model Management', 'Dataspace Discovery')
WHERE user_role IN ('Semantic Model Management', 'Identity Wallet Management', 'Dataspace Discovery')
) ur
)
INSERT INTO portal.technical_user_profile_assigned_user_roles (technical_user_profile_id, user_role_id)
Expand Down

0 comments on commit 58d5ad3

Please sign in to comment.