Skip to content

Legal API: create new endpoint #28601

Closed
Closed

Description

@severinbeauvais

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.

Activity

  1. added
    Entities Team
    on May 23, 2025
  2. changed the issue type fromtoon May 23, 2025
  3. changed the title [-]Legal API: create authorized actions table[/-] [+]Legal API: create new endpoint[/+] on May 27, 2025
  4. severinbeauvais commented on May 30, 2025

    @severinbeauvais
    CollaboratorAuthor

    Pseudo-code:

    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 []
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Entities Team

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions