Skip to content

Namerequest UI: refactor roles to permissions #27572

Closed

Description

@severinbeauvais
  • change "isStaff", "isPremium" and similar to isAuthorized(xxx) where xxx is a permission
  • add list of permissions
  • implement isAuthorized
  • update unit tests

See what was done for Create UI in this PR: bcgov/business-create-ui#783

Doc with role mappings: https://docs.google.com/spreadsheets/d/13P4ZA19lJfXJX95N5OfQMu6jYuotDH6h2hDf2DnAv0E/edit?gid=1335805235#gid=1335805235

Activity

  1. added
    Entities Team
    Names Team
    and removed on May 5, 2025
  2. severinbeauvais commented on May 6, 2025

    @severinbeauvais
    CollaboratorAuthor

    @ozamani9gh Do you think Namerequest UI should support authentication roles (ie, group roles per account type) instead of the hard-coded "is staff" (and possibly others) in the code? If so, does your team have bandwidth to do this work?

    Entities Team has refactored Create UI to replace "is staff" with isAuthorized(xxx) where xxx is a role provided for the current user. However, the user-to-role matrix is still hard-coded, but not for long. We hope to get these roles into Keycloak (or Auth db) very soon. I suggest the same approach for Namerequest UI: refactor, then replace internal matrix with Auth API lookup.

    I haven't looked recently but I think Namerequest doesn't have many "is staff" conditional logic, so this should be straightforward. Whoever does this will have to think about what roles (aka permissions) to give to the different account types (eg, reg use, staff, SBC staff, Maximus, etc).

    cc: @OlgaPotiagalova @Mihai-QuickSilverDev

  3. ozamani9gh commented on May 7, 2025

    @ozamani9gh
    Collaborator

    @severinbeauvais we should have capacity over next two months (by the end of PI 25). I moved it to Grooming to get feedback from team to see how easy this will be and if we have capacity in PI 25 to complete work.

  4. self-assigned this
    on May 8, 2025
  5. ozamani9gh commented on May 8, 2025

    @ozamani9gh
    Collaborator

    @ozamani9gh @eve-git will meet with Severin to get details of changes

  6. removed their assignment
    on May 12, 2025
  7. ozamani9gh commented on May 12, 2025

    @ozamani9gh
    Collaborator
  8. removed
    Entities Team
    on May 15, 2025
  9. severinbeauvais commented on May 23, 2025

    @severinbeauvais
    CollaboratorAuthor

    Some meetings were held with Megan F and Lance H. The following Name Request permissions were decided upon for the various account types. This is more than "is role staff" so some work is needed.

    image.png

    Ref: https://docs.google.com/spreadsheets/d/13P4ZA19lJfXJX95N5OfQMu6jYuotDH6h2hDf2DnAv0E/edit?gid=1874127980#gid=1874127980

    There are a few options for how to map "role" to "permissions". Here is how Entities is doing it (but then again, we have 50+ permissions):
    https://app.zenhub.com/workspaces/entities---olga-65af15f59e89f5043c2911f7/issues/gh/bcgov/entity/28599

    @ozamani9gh , I'm leaving it with you and your team to prioritize and groom this work. Let me know if you want more details or need help :)

    cc: @seeker25

  10. ozamani9gh commented on May 26, 2025

    @ozamani9gh
    Collaborator

    Use this matrix and create one for Name Request from above specs

    Entities User Types and Permissions.xlsx

  11. davemck513 commented on Jun 12, 2026

    @davemck513
    Collaborator

    no resources, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Name RequestNames Teampriority 2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions