Currently, to check if access control is enabled in Dashboards UI, we make a call to GET /internal/access_control/is_enabled. The response then decides to show certain UI features like the share modal permissions or not. This setting is passed via the core context request handler and creates duplication of isAccessControlEnabled() logic in the core code and this endpoint.
Ideally, we'd like to pass this to the Dashboard App during rendering as a prop which can then be used via a single source of truth allowing us to remove this internal endpoint.