Skip to content

Commit

Permalink
remove dash in idm role name
Browse files Browse the repository at this point in the history
  • Loading branch information
BearHanded committed Aug 13, 2024
1 parent 698297b commit c830005
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
26 changes: 13 additions & 13 deletions services/ui-auth/libs/users.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
{
"Name": "custom:cms_roles",
"Value": "mdct-hcbs-bor"
"Value": "mdcthcbs-bor"
}
]
},
Expand All @@ -46,7 +46,7 @@
},
{
"Name": "custom:cms_roles",
"Value": "mdct-hcbs-bor"
"Value": "mdcthcbs-bor"
}
]
},
Expand All @@ -71,7 +71,7 @@
},
{
"Name": "custom:cms_roles",
"Value": "mdct-hcbs-hd"
"Value": "mdcthcbs-hd"
}
]
},
Expand All @@ -96,7 +96,7 @@
},
{
"Name": "custom:cms_roles",
"Value": "mdct-hcbs-internal-user"
"Value": "mdcthcbs-internal-user"
}
]
},
Expand All @@ -121,7 +121,7 @@
},
{
"Name": "custom:cms_roles",
"Value": "mdct-hcbs-state-user"
"Value": "mdcthcbs-state-user"
},
{
"Name": "custom:cms_state",
Expand Down Expand Up @@ -150,7 +150,7 @@
},
{
"Name": "custom:cms_roles",
"Value": "mdct-hcbs-state-rep"
"Value": "mdcthcbs-state-rep"
},
{
"Name": "custom:cms_state",
Expand Down Expand Up @@ -179,7 +179,7 @@
},
{
"Name": "custom:cms_roles",
"Value": "mdct-hcbs-appr"
"Value": "mdcthcbs-appr"
},
{
"Name": "custom:cms_state",
Expand Down Expand Up @@ -208,7 +208,7 @@
},
{
"Name": "custom:cms_roles",
"Value": "mdct-hcbs-state-user"
"Value": "mdcthcbs-state-user"
},
{
"Name": "custom:cms_state",
Expand Down Expand Up @@ -237,7 +237,7 @@
},
{
"Name": "custom:cms_roles",
"Value": "mdct-hcbs-state-user"
"Value": "mdcthcbs-state-user"
},
{
"Name": "custom:cms_state",
Expand Down Expand Up @@ -266,7 +266,7 @@
},
{
"Name": "custom:cms_roles",
"Value": "mdct-hcbs-state-user"
"Value": "mdcthcbs-state-user"
},
{
"Name": "custom:cms_state",
Expand Down Expand Up @@ -295,7 +295,7 @@
},
{
"Name": "custom:cms_roles",
"Value": "mdct-hcbs-state-user"
"Value": "mdcthcbs-state-user"
},
{
"Name": "custom:cms_state",
Expand Down Expand Up @@ -324,7 +324,7 @@
},
{
"Name": "custom:cms_roles",
"Value": "mdct-hcbs-bor"
"Value": "mdcthcbs-bor"
}
]
},
Expand All @@ -349,7 +349,7 @@
},
{
"Name": "custom:cms_roles",
"Value": "mdct-hcbs-state-user"
"Value": "mdcthcbs-state-user"
},
{
"Name": "custom:cms_state",
Expand Down
10 changes: 5 additions & 5 deletions services/ui-src/src/types/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

// TODO: Finalize with IDM
export enum UserRoles {
ADMIN = "mdct-hcbs-bor", // "MDCT HCBS Business Owner Representative"
APPROVER = "mdct-hcbs-appr", // "MDCT HCBS Approver"
HELP_DESK = "mdct-hcbs-hd", // "MDCT HCBS Help Desk"
INTERNAL = "mdct-hcbs-internal-user", // "MDCT HCBS Internal User"
STATE_USER = "mdct-hcbs-state-user", // "MDCT HCBS State User"
ADMIN = "mdcthcbs-bor", // "MDCT HCBS Business Owner Representative"
APPROVER = "mdcthcbs-appr", // "MDCT HCBS Approver"
HELP_DESK = "mdcthcbs-hd", // "MDCT HCBS Help Desk"
INTERNAL = "mdcthcbs-internal-user", // "MDCT HCBS Internal User"
STATE_USER = "mdcthcbs-state-user", // "MDCT HCBS State User"
}

export interface HcbsUser {
Expand Down
2 changes: 1 addition & 1 deletion services/ui-src/src/utils/auth/UserProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const UserProvider = ({ children }: Props) => {
const { email, given_name, family_name } = payload;
// "custom:cms_roles" is an string of concat roles so we need to check for the one applicable to HCBS
const cms_role = payload["custom:cms_roles"] as string;
const userRole = cms_role.split(",").find((r) => r.includes("mdct-hcbs"));
const userRole = cms_role.split(",").find((r) => r.includes("mdcthcbs"));
const state = payload["custom:cms_state"] as string | undefined;
const full_name = [given_name, " ", family_name].join("");
const userCheck = {
Expand Down

0 comments on commit c830005

Please sign in to comment.