Skip to content

Commit

Permalink
[Bug][Workspace] Add permission validation at workspace detail page (o…
Browse files Browse the repository at this point in the history
…pensearch-project#7435)

* [Bug][Workspace] Add permission validate at workspace detail page

Signed-off-by: yubonluo <yubonluo@amazon.com>

* Changeset file for PR opensearch-project#7435 created/updated

---------

Signed-off-by: yubonluo <yubonluo@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and Qxisylolo committed Aug 1, 2024
1 parent ab2cf25 commit 05c9ea6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/7435.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- [Bug][Workspace] Add permission validation at workspace detail page ([#7435](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7435))
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export const WorkspaceUpdater = (props: WorkspaceUpdaterProps) => {
dataSourceManagement?: DataSourceManagementPluginSetup;
}>();

const isPermissionEnabled = application?.capabilities.workspaces.permissionEnabled;
const currentWorkspace = useObservable(workspaces ? workspaces.currentWorkspace$ : of(null));
const availableUseCases = useObservable(props.registeredUseCases$, []);
const [currentWorkspaceFormData, setCurrentWorkspaceFormData] = useState<FormDataFromWorkspace>();
Expand Down Expand Up @@ -160,6 +161,7 @@ export const WorkspaceUpdater = (props: WorkspaceUpdaterProps) => {
onSubmit={handleWorkspaceFormSubmit}
operationType={WorkspaceOperationType.Update}
savedObjects={savedObjects}
permissionEnabled={isPermissionEnabled}
detailTab={props.detailTab}
dataSourceManagement={dataSourceManagement}
availableUseCases={availableUseCases}
Expand Down

0 comments on commit 05c9ea6

Please sign in to comment.