Skip to content

Commit

Permalink
Add comment for move set default data source before workspace update
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Wang <wonglam@amazon.com>
  • Loading branch information
wanglam committed Aug 8, 2024
1 parent f36019d commit f1658dd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/plugins/workspace/server/workspace_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ export class WorkspaceClient implements IWorkspaceClientImpl {
}
}

/**
* When the workspace owner unassign themselves, ensure the default data source is set before
* updating the workspace permissions. This prevents a lack of write permission on saved objects
* after the user is removed from the workspace.
**/
if (newDataSources && this.uiSettings && client) {
const uiSettingsClient = this.uiSettings.asScopedToClient(client);
try {
Expand Down

0 comments on commit f1658dd

Please sign in to comment.