fix: cascade organization hideBranding setting to user and team events (#21703)
- Add utility function for cascading hideBranding logic - Update all getServerSideProps files to check organization hideBranding as fallback - Ensure team queries include parent hideBranding data - Fix hideBranding not working for organization members and teams Fixes the issue where organization-level branding settings were not being applied to user and team event pages when the direct entity didn't have hideBranding enabled. Co-authored-by: Hariom Balhara <[email protected]>
This commit is contained in:
1 parent
2aaf672b10
commit
2fcb8a750d
10 files changed
+220
-7
No files matched your search
@@ -8,6 +8,7 @@ import { getBookingForReschedule, getBookingForSeatedEvent } from "@calcom/featu
|
||||
import { orgDomainConfig } from "@calcom/features/ee/organizations/lib/orgDomains";
|
||||
import type { getPublicEvent } from "@calcom/features/eventtypes/lib/getPublicEvent";
|
||||
import { getUsernameList } from "@calcom/lib/defaultEvents";
|
||||
import { shouldHideBrandingForUserEvent } from "@calcom/lib/hideBranding";
|
||||
import { EventRepository } from "@calcom/lib/server/repository/event";
|
||||
import { UserRepository } from "@calcom/lib/server/repository/user";
|
||||
import slugify from "@calcom/lib/slugify";
|
||||
@@ -270,7 +271,10 @@ async function getUserPageProps(context: GetServerSidePropsContext) {
|
||||
eventData: eventData,
|
||||
user: username,
|
||||
slug,
|
||||
isBrandingHidden: user?.hideBranding,
|
||||
isBrandingHidden: shouldHideBrandingForUserEvent({
|
||||
eventTypeId: eventData.id,
|
||||
owner: user,
|
||||
}),
|
||||
isSEOIndexable: allowSEOIndexing,
|
||||
themeBasis: username,
|
||||
bookingUid: bookingUid ? `${bookingUid}` : null,
|
||||
|
||||
Reference in new issue
Block a user