From fd6d57b31c3e000bfcaf597df4e18e42ebea1767 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 24 Dec 2024 09:37:14 +0000 Subject: [PATCH] [Workspace] fix: hide collaborators page on nav when newHomePage is disabled (#9116) * fix: fix collaborators page on nav when newHomePage is disabled Signed-off-by: tygao * Changeset file for PR #9116 created/updated --------- Signed-off-by: tygao Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> (cherry picked from commit b603c2166d89aefd59fa7df618d5a9507e9ed4c3) Signed-off-by: github-actions[bot] --- changelogs/fragments/9116.yml | 2 ++ src/plugins/workspace/public/plugin.ts | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/9116.yml diff --git a/changelogs/fragments/9116.yml b/changelogs/fragments/9116.yml new file mode 100644 index 000000000000..c33970d01a18 --- /dev/null +++ b/changelogs/fragments/9116.yml @@ -0,0 +1,2 @@ +fix: +- Hide collaborators page on nav when newHomePage is disabled ([#9116](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9116)) \ No newline at end of file diff --git a/src/plugins/workspace/public/plugin.ts b/src/plugins/workspace/public/plugin.ts index 0dbf5fe0bb02..4ef84d302a7c 100644 --- a/src/plugins/workspace/public/plugin.ts +++ b/src/plugins/workspace/public/plugin.ts @@ -596,7 +596,12 @@ export class WorkspacePlugin this.coreStart = core; const isPermissionEnabled = core?.application?.capabilities.workspaces.permissionEnabled; this.collaboratorsAppUpdater$.next(() => { - return { status: isPermissionEnabled ? AppStatus.accessible : AppStatus.inaccessible }; + return { + status: isPermissionEnabled ? AppStatus.accessible : AppStatus.inaccessible, + navLinkStatus: core.chrome.navGroup.getNavGroupEnabled() + ? AppNavLinkStatus.visible + : AppNavLinkStatus.hidden, + }; }); this.currentWorkspaceIdSubscription = this._changeSavedObjectCurrentWorkspace();