Skip to content

Commit

Permalink
TS-936 Municipality
Browse files Browse the repository at this point in the history
- Fix after code rabbit review
  • Loading branch information
birkirkristmunds committed Dec 27, 2024
1 parent f17ae44 commit 87e8dd6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ const AccessControl: FC<React.PropsWithChildren<unknown>> = () => {
!hasDeveloperRole(user?.role) ? role !== Role.developer : role,
)
.filter((role) => {
if (hasMunicipalityRole(Role.municipality)) {
if (hasMunicipalityRole(user?.role)) {
return (
role === Role.recyclingCompany ||
role === Role.recyclingCompanyAdmin ||
Expand All @@ -272,6 +272,7 @@ const AccessControl: FC<React.PropsWithChildren<unknown>> = () => {
label: getRoleTranslation(role as Role, activeLocale),
value: role,
}))
.sort((a, b) => a.label.localeCompare(b.label))

const handleCreateAccessControlCloseModal = () =>
setIsCreateAccessControlModalVisible(false)
Expand Down

0 comments on commit 87e8dd6

Please sign in to comment.