Skip to content

EXUI-4758 - Add changes to allow multiple role categories - #548

Open
connorpgpmcelroy wants to merge 4 commits into
masterfrom
task/EXUI-4758-multiple-role-categories
Open

EXUI-4758 - Add changes to allow multiple role categories#548
connorpgpmcelroy wants to merge 4 commits into
masterfrom
task/EXUI-4758-multiple-role-categories

Conversation

@connorpgpmcelroy

Copy link
Copy Markdown
Contributor

Resolves #https://tools.hmcts.net/jira/browse/EXUI-4758

Notes:

  • Allows use of multiple role categories for users/caseworkers

@connorpgpmcelroy
connorpgpmcelroy requested a review from a team as a code owner June 23, 2026 10:02
@connorpgpmcelroy
connorpgpmcelroy requested review from RiteshHMCTS, balajisridharanhmcts and chrisjones-hmcts and removed request for a team June 23, 2026 10:02
}

// Note: Domain only used internally to set the PersonRole for the Person object
private setDomain(caseworker: Caseworker): PersonRole {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private setDomain(caseworker: Caseworker): PersonRole {
private getPersonRole(roleCategories: RoleCategory[]): PersonRole {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now I'll leave it because domain is still the term used in other parts of common-lib and this is shortly to enter QA


// Note: Domain only used internally to set the PersonRole for the Person object
private setDomain(caseworker: Caseworker): PersonRole {
if (caseworker.roleCategories.includes(RoleCategory.ADMIN)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is changing the result as well as just extracting from the list, is that expected?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean giving one role category, it's not really that important because this data field of 'domain' is not currently used anywhere - it just gives that roleCategory value to the objects to give more information about the data

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean that before this change, PersonRole could either be legal ops or admin. Now it can be admin, ctsc or legal ops (in that order). If that doesn't affect anything then that's fine, but why change it?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants