You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(web): Add ability to refresh permissions from account linking settings (#945)
* feat(backend): add API endpoint to trigger account-driven permission sync (SOU-578)
Adds POST /api/trigger-account-permission-sync that creates and enqueues
an AccountPermissionSyncJob for a given accountId, with entitlement and
provider validation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(web): generalize linked accounts with Linear-style UI
- Introduces `LinkedAccount` type in `ee/features/sso/actions.ts` covering all OAuth providers (SSO + account_linking), replacing the narrower `LinkedAccountProviderState`
- Rewrites linked accounts UI with Linear-style Connect / Connected dropdown pattern; dropdown includes Disconnect and Refresh Permissions actions
- Adds `triggerAccountPermissionSync` server action and worker API call for per-account permission refresh
- Renames settings page from "Permission Syncing" to "Linked Accounts"
- Removes `getLinkedAccountProviderStates` in favour of `getLinkedAccounts`
- Moves SSO-related components and actions from `ee/features/permissionSyncing/` to `ee/features/sso/`
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* chore: update CHANGELOG for #945
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* changelog
* deprecate AUTH_EE_ALLOW_EMAIL_ACCOUNT_LINKING option and always enable it
* add spinner when permissions are being refreshed
* feedback
* Add back AUTH_EE_ALLOW_EMAIL_ACCOUNT_LINKING. Change default to true
* docs
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
17
17
- Added login wall when anonymous users try to send messages on duplicated chats (askgh experiment). [#939](https://github.com/sourcebot-dev/sourcebot/pull/939)
18
18
- Added `GET /api/ee/user` endpoint that returns the authenticated owner's user info (name, email, createdAt, updatedAt). [#940](https://github.com/sourcebot-dev/sourcebot/pull/940)
19
19
- Added `selectedReposCount` to the `wa_chat_message_sent` PostHog event to track the number of selected repositories when users ask questions. [#941](https://github.com/sourcebot-dev/sourcebot/pull/941)
20
+
- Added ability to re-sync repo permissions from the "linked accounts" settings page. [#945](https://github.com/sourcebot-dev/sourcebot/pull/945)
20
21
21
22
### Changed
22
23
- Hide version upgrade toast for askgithub deployment (`EXPERIMENT_ASK_GH_ENABLED`). [#931](https://github.com/sourcebot-dev/sourcebot/pull/931)
|`AUTH_EE_ALLOW_EMAIL_ACCOUNT_LINKING`|`false`| <p>When enabled, different SSO accounts with the same email address will automatically be linked.</p> |
48
+
|`AUTH_EE_ALLOW_EMAIL_ACCOUNT_LINKING`|`true`| <p>When enabled, different SSO accounts with the same email address will automatically be linked.</p> |
Copy file name to clipboardExpand all lines: docs/docs/features/permission-syncing.mdx
+19-5Lines changed: 19 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ We are actively working on supporting more code hosts. If you'd like to see a sp
47
47
48
48
# Getting started
49
49
50
-
## GitHub
50
+
###GitHub
51
51
52
52
Prerequisites:
53
53
- Configure a [GitHub connection](/docs/connections/github).
@@ -65,7 +65,7 @@ Permission syncing works with **GitHub.com**, **GitHub Enterprise Cloud**, and *
65
65
- A GitHub [external identity provider](/docs/configuration/idp#github) must be configured to (1) correlate a Sourcebot user with a GitHub user, and (2) to list repositories that the user has access to for [User driven syncing](/docs/features/permission-syncing#how-it-works).
66
66
- OAuth tokens must assume the `repo` scope in order to use the [List repositories for the authenticated user API](https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#list-repositories-for-the-authenticated-user) during [User driven syncing](/docs/features/permission-syncing#how-it-works). Sourcebot **will only** use this token for **reads**.
67
67
68
-
## GitLab
68
+
###GitLab
69
69
70
70
Prerequisites:
71
71
- Configure a [GitLab connection](/docs/connections/gitlab).
@@ -80,7 +80,7 @@ Permission syncing works with **GitLab Self-managed** and **GitLab Cloud**. User
80
80
- OAuth tokens require the `read_api` scope in order to use the [List projects for the authenticated user API](https://docs.gitlab.com/ee/api/projects.html#list-all-projects) during [User driven syncing](/docs/features/permission-syncing#how-it-works).
81
81
-[Internal GitLab projects](https://docs.gitlab.com/user/public_access/#internal-projects-and-groups) are **not** enforced by permission syncing and therefore are visible to all users. Only [private projects](https://docs.gitlab.com/user/public_access/#private-projects-and-groups) are enforced.
82
82
83
-
## Bitbucket Cloud
83
+
###Bitbucket Cloud
84
84
85
85
Prerequisites:
86
86
- Configure a [Bitbucket Cloud connection](/docs/connections/bitbucket-cloud).
@@ -104,7 +104,7 @@ If your workspace relies heavily on group or project-level permissions rather th
104
104
- A Bitbucket Cloud [external identity provider](/docs/configuration/idp#bitbucket-cloud) must be configured to (1) correlate a Sourcebot user with a Bitbucket Cloud user, and (2) to list repositories that the user has access to for [User driven syncing](/docs/features/permission-syncing#how-it-works).
105
105
- OAuth tokens require the `account` and `repository` scopes. The `repository` scope is required to list private repositories during [User driven syncing](/docs/features/permission-syncing#how-it-works).
106
106
107
-
## Bitbucket Data Center
107
+
###Bitbucket Data Center
108
108
109
109
Prerequisites:
110
110
- Configure a [Bitbucket Data Center connection](/docs/connections/bitbucket-data-center).
@@ -138,4 +138,18 @@ User driven and repo driven syncing occurs every 24 hours by default. These inte
|`experiment_repoDrivenPermissionSyncIntervalMs`| number | 24 hours | 1 |
141
-
|`experiment_userDrivenPermissionSyncIntervalMs`| number | 24 hours | 1 |
141
+
|`experiment_userDrivenPermissionSyncIntervalMs`| number | 24 hours | 1 |
142
+
143
+
## Manually refreshing permissions
144
+
145
+
If a user's permissions have changed and they need access updated immediately (without waiting for the next scheduled sync), they can trigger a manual refresh from the **Linked Accounts** page:
146
+
147
+
1. Navigate to **Settings → Linked Accounts**.
148
+
2. Click the **Connected** button next to the relevant code host account.
149
+
3. Select **Refresh Permissions** from the dropdown.
0 commit comments