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
{{ message }}
Repository navigation
Namerequest UI: refactor roles to permissions #27572
@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).
@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.
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.
Activity
severinbeauvais commentedon May 6, 2025
@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
ozamani9gh commentedon May 7, 2025
@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.
ozamani9gh commentedon May 8, 2025
@ozamani9gh @eve-git will meet with Severin to get details of changes
ozamani9gh commentedon May 12, 2025
isStaffPaymentValid (5 places)
https://github.com/search?q=repo%3Abcgov%2Fnamerequest%20isStaff&type=code
IsRoleStaff (11 places)
https://github.com/search?q=repo%3Abcgov%2Fnamerequest+isRoleStaff&type=code
severinbeauvais commentedon May 23, 2025
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.
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
ozamani9gh commentedon May 26, 2025
Use this matrix and create one for Name Request from above specs
Entities User Types and Permissions.xlsx
davemck513 commentedon Jun 12, 2026
no resources, closing.