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>
(cherry picked from commit 45d34b5)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent ebbb528 commit 12cc42e
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 12cc42e

Please sign in to comment.