From 01cc1090369dbced31ee0896306e344e5e22c3ea Mon Sep 17 00:00:00 2001 From: N-o-Z Date: Tue, 6 Aug 2024 13:59:01 -0400 Subject: [PATCH] ACLs: add deprecation banner (#8057) * ACLs: add deprecation banner * CR Fixes --- webui/src/lib/components/auth/layout.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/webui/src/lib/components/auth/layout.tsx b/webui/src/lib/components/auth/layout.tsx index cb4f60fe772..cbcd5d1e8e4 100644 --- a/webui/src/lib/components/auth/layout.tsx +++ b/webui/src/lib/components/auth/layout.tsx @@ -6,6 +6,7 @@ import Col from "react-bootstrap/Col"; import Nav from "react-bootstrap/Nav"; import Card from "react-bootstrap/Card"; +import {auth} from "../../api"; import {Link} from "../nav"; import {useLoginConfigContext} from "../../hooks/conf"; import {useLayoutOutletContext} from "../layout"; @@ -14,7 +15,6 @@ import {InfoIcon} from "@primer/octicons-react"; type AuthOutletContext = [(tab: string) => void]; - const rbacDismissedKey = "lakefs:ui:acl:dismissRBACAlert"; export const AuthLayout = () => { const [showRBACAlert, setShowRBACAlert] = useState(!window.localStorage.getItem(rbacDismissedKey)); @@ -24,12 +24,23 @@ export const AuthLayout = () => { useEffect(() => { setIsLogged(true); }, [setIsLogged]); + const [displayACLDeprecation, setDisplayACLDeprecation] = useState(false); + useEffect(() => { + const listUsers = async () => { + return await auth.listUsers("", "", 2); + } + listUsers().then(r => setDisplayACLDeprecation(r.results.length > 1)); + },[]) return (
+ { displayACLDeprecation && + {" "}ACLs are moving out of core lakeFS!{" "}See the announcement{" "} + to learn why and how to continue using your existing lakeFS installation in future versions. + } {rbac === 'simplified' && showRBACAlert && - { + { window.localStorage.setItem(rbacDismissedKey, "true"); setShowRBACAlert(false); }}>{" "}Enhance Your Security with {" "}Role-Based Access Control{" "}