fix: #16079 hide settings/Admin API if not org and update link to sales (#16198)

* hide admin_api if not org and update link to sales

* update for org members

* updated back to orgAdmin check
This commit is contained in:
Vijay authored and GitHub committed 2024-08-20 16:17:24 +09:00
1 parent b946abab02
commit 0611bbd50e
2 files changed
+5 -3

No files matched your search

@@ -192,8 +192,10 @@ const useTabs = () => {
(childTab) => childTab.href !== "/settings/security/two-factor-auth"
);
return { ...tab, children: filtered };
} else if (tab.href === "/settings/developer" && !!orgBranding) {
const filtered = tab?.children?.filter((childTab) => childTab.name !== "admin_api");
} else if (tab.href === "/settings/developer") {
const filtered = tab?.children?.filter(
(childTab) => isOrgAdminOrOwner || childTab.name !== "admin_api"
);
return { ...tab, children: filtered };
}
return tab;