Skip to content

Commit

Permalink
[Workspace] fix: hide collaborators page on nav when newHomePage is d…
Browse files Browse the repository at this point in the history
…isabled (#9116)

* fix: fix collaborators page on nav when newHomePage is disabled

Signed-off-by: tygao <[email protected]>

* Changeset file for PR #9116 created/updated

---------

Signed-off-by: tygao <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit b603c21)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 1050dee commit fd6d57b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/9116.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Hide collaborators page on nav when newHomePage is disabled ([#9116](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/9116))
7 changes: 6 additions & 1 deletion src/plugins/workspace/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Check warning on line 599 in src/plugins/workspace/public/plugin.ts

View check run for this annotation

Codecov / codecov/patch

src/plugins/workspace/public/plugin.ts#L599

Added line #L599 was not covered by tests
status: isPermissionEnabled ? AppStatus.accessible : AppStatus.inaccessible,
navLinkStatus: core.chrome.navGroup.getNavGroupEnabled()
? AppNavLinkStatus.visible
: AppNavLinkStatus.hidden,
};
});

this.currentWorkspaceIdSubscription = this._changeSavedObjectCurrentWorkspace();
Expand Down

0 comments on commit fd6d57b

Please sign in to comment.