From 3961e1321ad3f9715a779dbb5d4fc6d9b05540cf Mon Sep 17 00:00:00 2001 From: "Tasnimul H. Tauhid" Date: Mon, 11 Sep 2023 11:17:06 +0530 Subject: [PATCH] Disabled asset config for user other than admin --- src/Components/Assets/AssetManage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Components/Assets/AssetManage.tsx b/src/Components/Assets/AssetManage.tsx index 825cee1c848..25f879ddd09 100644 --- a/src/Components/Assets/AssetManage.tsx +++ b/src/Components/Assets/AssetManage.tsx @@ -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"; @@ -452,7 +452,7 @@ const AssetManage = (props: AssetManageProps) => { } id="configure-asset" data-testid="asset-configure-button" - authorizeFor={NonReadOnlyUsers} + authorizeFor={AuthorizeFor(["DistrictAdmin", "StateAdmin"])} > {t("configure")}