Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed
- Fixed spurious infinite loads with explore panel, file tree, and file search command. [#617](https://github.com/sourcebot-dev/sourcebot/pull/617)
- Wipe search context on init if entitlement no longer exists [#618](https://github.com/sourcebot-dev/sourcebot/pull/618)

## [4.9.2] - 2025-11-13

Expand Down
12 changes: 12 additions & 0 deletions packages/web/src/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ const initSingleTenancy = async () => {
}
}

// If we don't have the search context entitlement then wipe any existing
// search contexts that may be present in the DB. This could happen if a deployment had
// the entitlement, synced search contexts, and then no longer had the entitlement
const hasSearchContextEntitlement = hasEntitlement("search-contexts")
if(!hasSearchContextEntitlement) {
await prisma.searchContext.deleteMany({
where: {
orgId: SINGLE_TENANT_ORG_ID,
},
});
}

// Sync anonymous access config from the config file
const config = await loadConfig(env.CONFIG_PATH);
const forceEnableAnonymousAccess = config.settings?.enablePublicAccess ?? env.FORCE_ENABLE_ANONYMOUS_ACCESS === 'true';
Expand Down
Loading