Skip to content

Opensearch dashboards.capabilitiessetup

Home > opensearch-dashboards > CapabilitiesSetup

CapabilitiesSetup interface

APIs to manage the Capabilities that will be used by the application.

Plugins relying on capabilities to toggle some of their features should register them during the setup phase using the registerProvider method.

Plugins having the responsibility to restrict capabilities depending on a given context should register their capabilities switcher using the registerSwitcher method.

Refers to the methods documentation for complete description and examples.

Signature:

export interface CapabilitiesSetup 

Methods

Method Description
registerProvider(provider) Register a CapabilitiesProvider to be used to provide Capabilities when resolving them.
registerSwitcher(switcher) Register a CapabilitiesSwitcher to be used to change the default state of the Capabilities entries when resolving them.A capabilities switcher can only change the state of existing capabilities. Capabilities added or removed when invoking the switcher will be ignored.