Skip to content

Commit ed17434

Browse files
feat(backend): only allow repo-driven permission syncing to be disabled
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fa8c1d5 commit ed17434

File tree

5 files changed

+3
-8
lines changed

5 files changed

+3
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111
- [EE] Added multi-owner support with promote/demote actions. [#988](https://github.com/sourcebot-dev/sourcebot/pull/988)
12-
- [EE] Added `PERMISSION_SYNC_USER_DRIVEN_ENABLED` and `PERMISSION_SYNC_REPO_DRIVEN_ENABLED` environment variables to independently enable/disable user-driven and repo-driven permission syncing. [#989](https://github.com/sourcebot-dev/sourcebot/pull/989)
12+
- [EE] Added `PERMISSION_SYNC_REPO_DRIVEN_ENABLED` environment variable to enable/disable repo-driven permission syncing. [#989](https://github.com/sourcebot-dev/sourcebot/pull/989)
1313

1414
## [4.15.3] - 2026-03-10
1515

docs/docs/configuration/environment-variables.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ The following environment variables allow you to configure your Sourcebot deploy
4646
| `AUTH_EE_GCP_IAP_ENABLED` | `false` | <p>When enabled, allows Sourcebot to automatically register/login from a successful GCP IAP redirect</p> |
4747
| `AUTH_EE_GCP_IAP_AUDIENCE` | - | <p>The GCP IAP audience to use when verifying JWT tokens. Must be set to enable GCP IAP JIT provisioning</p> |
4848
| `EXPERIMENT_EE_PERMISSION_SYNC_ENABLED` | `false` | <p>Enables [permission syncing](/docs/features/permission-syncing).</p> |
49-
| `PERMISSION_SYNC_USER_DRIVEN_ENABLED` | `true` | <p>Enables/disables [user-driven permission syncing](/docs/features/permission-syncing#how-it-works). Only applies when `EXPERIMENT_EE_PERMISSION_SYNC_ENABLED` is `true`.</p> |
5049
| `PERMISSION_SYNC_REPO_DRIVEN_ENABLED` | `true` | <p>Enables/disables [repo-driven permission syncing](/docs/features/permission-syncing#how-it-works). Only applies when `EXPERIMENT_EE_PERMISSION_SYNC_ENABLED` is `true`.</p> |
5150
| `AUTH_EE_ALLOW_EMAIL_ACCOUNT_LINKING` | `true` | <p>When enabled, different SSO accounts with the same email address will automatically be linked.</p> |
5251

docs/docs/features/permission-syncing.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,10 @@ Permission syncing works by periodically syncing ACLs from the code host(s) to S
134134
- **User driven** : fetches the list of all repositories that a given user has access to.
135135
- **Repo driven** : fetches the list of all users that have access to a given repository.
136136

137-
User driven and repo driven syncing occurs every 24 hours by default. Each sync direction can be independently enabled or disabled using the following environment variables:
137+
User driven and repo driven syncing occurs every 24 hours by default. Repo-driven syncing can be disabled independently using the following environment variable:
138138

139139
| Environment variable | Default | Description |
140140
|---|---|---|
141-
| `PERMISSION_SYNC_USER_DRIVEN_ENABLED` | `true` | Enables/disables user-driven syncing. |
142141
| `PERMISSION_SYNC_REPO_DRIVEN_ENABLED` | `true` | Enables/disables repo-driven syncing. |
143142

144143
The sync intervals can be configured using the following settings in the [config file](/docs/configuration/config-file):

packages/backend/src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ else if (env.EXPERIMENT_EE_PERMISSION_SYNC_ENABLED === 'true' && hasEntitlement(
7979
if (env.PERMISSION_SYNC_REPO_DRIVEN_ENABLED === 'true') {
8080
repoPermissionSyncer.startScheduler();
8181
}
82-
if (env.PERMISSION_SYNC_USER_DRIVEN_ENABLED === 'true') {
83-
accountPermissionSyncer.startScheduler();
84-
}
82+
accountPermissionSyncer.startScheduler();
8583
}
8684

8785
const api = new Api(

packages/shared/src/env.server.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,6 @@ export const env = createEnv({
247247
// @NOTE: Take care to update actions.ts when changing the name of this.
248248
EXPERIMENT_SELF_SERVE_REPO_INDEXING_GITHUB_TOKEN: z.string().optional(),
249249
EXPERIMENT_EE_PERMISSION_SYNC_ENABLED: booleanSchema.default('false'),
250-
PERMISSION_SYNC_USER_DRIVEN_ENABLED: booleanSchema.default('true'),
251250
PERMISSION_SYNC_REPO_DRIVEN_ENABLED: booleanSchema.default('true'),
252251
EXPERIMENT_ASK_GH_ENABLED: booleanSchema.default('false'),
253252

0 commit comments

Comments
 (0)