Skip to content

Commit

Permalink
Disabled asset config for user other than admin (ohcnetwork#6259)
Browse files Browse the repository at this point in the history
  • Loading branch information
thtauhid authored Sep 11, 2023
1 parent 4e8005c commit 7cda789
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Components/Assets/AssetManage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { useTranslation } from "react-i18next";
const PageTitle = lazy(() => import("../Common/PageTitle"));
const Loading = lazy(() => import("../Common/Loading"));
import * as Notification from "../../Utils/Notifications.js";
import { NonReadOnlyUsers } from "../../Utils/AuthorizeFor";
import AuthorizeFor, { NonReadOnlyUsers } from "../../Utils/AuthorizeFor";
import Uptime from "../Common/Uptime";
import useAuthUser from "../../Common/hooks/useAuthUser";
import dayjs from "dayjs";
Expand Down Expand Up @@ -452,7 +452,7 @@ const AssetManage = (props: AssetManageProps) => {
}
id="configure-asset"
data-testid="asset-configure-button"
authorizeFor={NonReadOnlyUsers}
authorizeFor={AuthorizeFor(["DistrictAdmin", "StateAdmin"])}
>
<CareIcon className="care-l-setting h-4" />
{t("configure")}
Expand Down

0 comments on commit 7cda789

Please sign in to comment.