You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A new endpoint is needed in Legal API to provide the authorized actions. No parameters are needed. The Legal API will look at the caller's bearer (Keycloak) token and determine which one of the roles (account types) the current user is. These roles (which are mutually exclusive (*)) are:
"staff" - REGI staff
"sbc_staff" - SBC Staff (tier 1 and tier 2 to be determined later)
"maximus_staff" - Maximus Help Desk staff
"contact_centre_staff - SBC Contact Centre staff (was previous BCOL Help Desk)
"public_user" - regular user (*)
(*) If an account has public_user and another role, use the other role. In other words, check for public_user last.
Once the Legal API has determined which account type this is, it will look up all its applicable authorized actions (aka permissions) in a table, and return that to the calling UI.
if (KC role includes "staff") then return Staff permissions
else if (KC role includes "sbc_staff") then return SBC Staff permissions
else if (KC role includes "maximus_staff") then return Maximus Staff permissions
else if (KC role includes "contact_centre_staff") then return Contact Centre Staff permissions
else if (KC role includes "public_user") then return public/regular user permissions
else return []
Activity
[-]Legal API: create authorized actions table[/-][+]Legal API: create new endpoint[/+]severinbeauvais commentedon May 30, 2025
Pseudo-code: