mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
fix(slo): Add slo-settings saved object to the slo feature registration (#182509)
## Summary This PR register the slo settings saved object with the slo feature. **How to test** 1. Create some SLOs with an admin account 1. Setup a new role with a **read** access to the Observability > SLO feature, and the `*` index -> `read` 2. Setup a new user with that role 3. Go to the SLO page 4. Notice /api/observability/slo/settings and /api/observability/slos api are failing with Forbidden: `Unable to get slo-settings` 5. Checkout this branch 6. Errors should be gone.
This commit is contained in:
parent
79b4d5e963
commit
0291c8195a
1 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ import { registerBurnRateRule } from './lib/rules/register_burn_rate_rule';
|
|||
import { SloConfig } from '.';
|
||||
import { registerRoutes } from './routes/register_routes';
|
||||
import { getSloServerRouteRepository } from './routes/get_slo_server_route_repository';
|
||||
import { sloSettings } from './saved_objects/slo_settings';
|
||||
import { sloSettings, SO_SLO_SETTINGS_TYPE } from './saved_objects/slo_settings';
|
||||
|
||||
export type SloPluginSetup = ReturnType<SloPlugin['setup']>;
|
||||
|
||||
|
@ -73,7 +73,7 @@ export class SloPlugin implements Plugin<SloPluginSetup> {
|
|||
const config = this.initContext.config.get<SloConfig>();
|
||||
const alertsLocator = plugins.share.url.locators.create(new AlertsLocatorDefinition());
|
||||
|
||||
const savedObjectTypes = [SO_SLO_TYPE];
|
||||
const savedObjectTypes = [SO_SLO_TYPE, SO_SLO_SETTINGS_TYPE];
|
||||
|
||||
plugins.features.registerKibanaFeature({
|
||||
id: sloFeatureId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue