mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 20:55:54 +08:00
fix: added billing page condition to not show when its not either cloud or enterprise (#4827)
This commit is contained in:
parent
31c0b94ae6
commit
e9bb05cc5d
@ -147,7 +147,11 @@ function App(): JSX.Element {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isOnBasicPlan || (isLoggedInState && role && role !== 'ADMIN')) {
|
if (
|
||||||
|
isOnBasicPlan ||
|
||||||
|
(isLoggedInState && role && role !== 'ADMIN') ||
|
||||||
|
!(isCloudUserVal || isEECloudUser())
|
||||||
|
) {
|
||||||
const newRoutes = routes.filter((route) => route?.path !== ROUTES.BILLING);
|
const newRoutes = routes.filter((route) => route?.path !== ROUTES.BILLING);
|
||||||
setRoutes(newRoutes);
|
setRoutes(newRoutes);
|
||||||
}
|
}
|
||||||
|
@ -96,6 +96,8 @@ function SideNav({
|
|||||||
|
|
||||||
const { registerShortcut, deregisterShortcut } = useKeyboardHotkeys();
|
const { registerShortcut, deregisterShortcut } = useKeyboardHotkeys();
|
||||||
|
|
||||||
|
const isCloudUserVal = isCloudUser();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (inviteMembers) {
|
if (inviteMembers) {
|
||||||
const updatedUserManagementMenuItems = [
|
const updatedUserManagementMenuItems = [
|
||||||
@ -135,7 +137,11 @@ function SideNav({
|
|||||||
license.isCurrent && license.planKey === LICENSE_PLAN_KEY.BASIC_PLAN,
|
license.isCurrent && license.planKey === LICENSE_PLAN_KEY.BASIC_PLAN,
|
||||||
) || licenseData?.payload?.licenses === null;
|
) || licenseData?.payload?.licenses === null;
|
||||||
|
|
||||||
if (role !== USER_ROLES.ADMIN || isOnBasicPlan) {
|
if (
|
||||||
|
role !== USER_ROLES.ADMIN ||
|
||||||
|
isOnBasicPlan ||
|
||||||
|
!(isCloudUserVal || isEECloudUser())
|
||||||
|
) {
|
||||||
items = items.filter((item) => item.key !== ROUTES.BILLING);
|
items = items.filter((item) => item.key !== ROUTES.BILLING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,8 +220,6 @@ function SideNav({
|
|||||||
pathname,
|
pathname,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const isCloudUserVal = isCloudUser();
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isCloudUser() || isEECloudUser()) {
|
if (isCloudUser() || isEECloudUser()) {
|
||||||
const updatedUserManagementMenuItems = [helpSupportMenuItem];
|
const updatedUserManagementMenuItems = [helpSupportMenuItem];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user