Skip to content

Commit

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

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

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

* Changeset file for PR #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
yubonluo and opensearch-changeset-bot[bot] authored Jul 25, 2024
1 parent 4ff4c3c commit 45d34b5
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 45d34b5

Please sign in to comment.