Skip to content

Commit

Permalink
chore: code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
YounixM committed Jan 3, 2025
1 parent ec9f34f commit 17225b0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions frontend/src/pages/Settings/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@ export const getRoutes = (
const isCloudAccount = isCloudUser();
const isEECloudAccount = isEECloudUser();

const isAdmin = userRole === USER_ROLES.ADMIN;
const isEditor = userRole === USER_ROLES.EDITOR;

settings.push(...generalSettings(t));

if (isCurrentOrgSettings) {
settings.push(...organizationSettings(t));
}

if (
isGatewayEnabled &&
(userRole === USER_ROLES.ADMIN || userRole === USER_ROLES.EDITOR)
) {
if (isGatewayEnabled && (isAdmin || isEditor)) {
settings.push(...multiIngestionSettings(t));
}

Expand All @@ -43,11 +43,11 @@ export const getRoutes = (

settings.push(...alertChannels(t));

if ((isCloudAccount || isEECloudAccount) && userRole === USER_ROLES.ADMIN) {
if ((isCloudAccount || isEECloudAccount) && isAdmin) {
settings.push(...apiKeys(t));
}

if (isCloudAccount && userRole === USER_ROLES.ADMIN) {
if (isCloudAccount && isAdmin) {
settings.push(...customDomainSettings(t));
}

Expand Down

0 comments on commit 17225b0

Please sign in to comment.