Skip to content

Commit

Permalink
feat: enable subdomain update only for cloud accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
YounixM committed Jan 3, 2025
1 parent f82e6de commit ec9f34f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ function TimezonePicker({
setIsOpen,
isOpenedFromFooter,
}: TimezonePickerProps): JSX.Element {
console.log({ isOpenedFromFooter });
const [searchTerm, setSearchTerm] = useState('');
const { timezone, updateTimezone } = useTimezone();
const [selectedTimezone, setSelectedTimezone] = useState<string>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ export function formatWithTimezone(
): string {
const parsedDate =
typeof dateValue === 'string' ? dateValue : dateValue?.format();
console.log('dateValue', parsedDate, 'timezone', timezone);

// Get the target timezone offset
const targetOffset = convertUtcOffsetToTimezoneOffset(
dayjs(dateValue).tz(timezone).utcOffset(),
Expand Down
10 changes: 8 additions & 2 deletions frontend/src/pages/Settings/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export const getRoutes = (
): RouteTabProps['routes'] => {
const settings = [];

const isCloudAccount = isCloudUser();
const isEECloudAccount = isEECloudUser();

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

if (isCurrentOrgSettings) {
Expand All @@ -34,14 +37,17 @@ export const getRoutes = (
settings.push(...multiIngestionSettings(t));
}

if (isCloudUser() && !isGatewayEnabled) {
if (isCloudAccount && !isGatewayEnabled) {
settings.push(...ingestionSettings(t));
}

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

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

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

Expand Down

0 comments on commit ec9f34f

Please sign in to comment.