Skip to content

Demonstrate usage of createAsyncUpdater to conditionally reveal main menu item#2

Open
cwperks wants to merge 1 commit intomainfrom
conditionally-show
Open

Demonstrate usage of createAsyncUpdater to conditionally reveal main menu item#2
cwperks wants to merge 1 commit intomainfrom
conditionally-show

Conversation

@cwperks
Copy link
Copy Markdown
Owner

@cwperks cwperks commented Mar 28, 2026

Description

This PR shows the dashboards-reporting plugin using the security-dashboard-plugin's (if installed) to call checkHasApiPermission and return the result. If true the logged user can see Reporting on the main menu and if false then its hidden. FYI a security admin user is someone with roles defined in the cluster setting plugins.security.restapi.roles_enabled: ["all_access", "security_rest_api_access"].

Note: This is a contrived example and not meant to be merged. The intended consumer would be a new dashboards-job-scheduler plugin: opensearch-project/.github#393

Issues Resolved

Related to opensearch-project/security#5635, but limited in scope to hiding/revealing a menu item only if the logged in user is a security admin.

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…menu item

Signed-off-by: Craig Perkins <craig5008@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant