diff --git a/src/services/ui/src/pages/dashboard/Lists/spas/consts.tsx b/src/services/ui/src/pages/dashboard/Lists/spas/consts.tsx index 3cec28d7e9..40e74404fa 100644 --- a/src/services/ui/src/pages/dashboard/Lists/spas/consts.tsx +++ b/src/services/ui/src/pages/dashboard/Lists/spas/consts.tsx @@ -1,7 +1,7 @@ import { format } from "date-fns"; import { removeUnderscoresAndCapitalize } from "@/utils"; import { OsTableColumn } from "@/components/Opensearch/Table/types"; -import { UserRoles } from "shared-types"; +import { CMS_READ_ONLY_ROLES, UserRoles } from "shared-types"; import { useGetUser } from "@/api/useGetUser"; import { renderCellActions, @@ -84,7 +84,7 @@ export const useSpaTableColumns = (): OsTableColumn[] => { cell: (data) => data.submitterName, }, // hide actions column for: readonly,help desk - ...(![UserRoles.HELPDESK, UserRoles.CMS_READ_ONLY].some((UR) => + ...(!CMS_READ_ONLY_ROLES.some((UR) => props.user?.["custom:cms-roles"].includes(UR) ) ? [ diff --git a/src/services/ui/src/pages/dashboard/Lists/waivers/consts.tsx b/src/services/ui/src/pages/dashboard/Lists/waivers/consts.tsx index 2541b79912..f1883adf37 100644 --- a/src/services/ui/src/pages/dashboard/Lists/waivers/consts.tsx +++ b/src/services/ui/src/pages/dashboard/Lists/waivers/consts.tsx @@ -2,7 +2,7 @@ import { removeUnderscoresAndCapitalize } from "@/utils"; import { OsTableColumn } from "@/components/Opensearch/Table/types"; import { LABELS } from "@/lib"; import { BLANK_VALUE } from "@/consts"; -import { UserRoles } from "shared-types"; +import { CMS_READ_ONLY_ROLES, UserRoles } from "shared-types"; import { useGetUser } from "@/api/useGetUser"; import { renderCellActions, @@ -90,7 +90,7 @@ export const useWaiverTableColumns = (): OsTableColumn[] => { cell: (data) => data.submitterName, }, // hide actions column for: readonly,help desk - ...(![UserRoles.HELPDESK, UserRoles.CMS_READ_ONLY].some((UR) => + ...(!CMS_READ_ONLY_ROLES.some((UR) => props.user?.["custom:cms-roles"].includes(UR) ) ? [