Skip to content

Commit

Permalink
Merge pull request #43 from City-of-Helsinki/UHF-X-kasko-role-mapping
Browse files Browse the repository at this point in the history
Disable openid_connect role mapping
  • Loading branch information
hyrsky authored Dec 20, 2024
2 parents cc246b5 + 27afe21 commit 13b645c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions helfi_tunnistamo.install
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ function helfi_tunnistamo_install() : void {
->set('user_login_display', 'below')
// Logout from openid connect provider by default.
->set('end_session_enabled', TRUE)
// Do not map roles in openid_connect module.
->set('role_mappings', [])
->save();
}

Expand Down Expand Up @@ -59,3 +61,17 @@ function helfi_tunnistamo_update_9003() : void {
->save();
}
}

/**
* UHF-X: Remove all openid_connect role mappings.
*
* Tunnistamo module has its own role mapping.
*
* @see \Drupal\helfi_tunnistamo\Plugin\OpenIDConnectClient\Tunnistamo::mapRoles()
*/
function helfi_tunnistamo_update_9004() : void {
\Drupal::configFactory()
->getEditable('openid_connect.settings')
->set('role_mappings', [])
->save();
}

0 comments on commit 13b645c

Please sign in to comment.