[OBS-UX-MGTM][Uptime] Change API access to new authz authorization paradigm (#203415)

## Summary

It fixes #203319
And mostly covered by https://github.com/elastic/kibana/pull/198374
This commit is contained in:
Faisal Kanout 2024-12-10 17:00:43 +01:00 committed by GitHub
parent a3d9fe34b4
commit 1c6b356fc5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -23,8 +23,10 @@ export const createMonitorListRoute: UMRestApiRouteFactory = (libs) => ({
pageSize: schema.number(),
}),
},
options: {
tags: ['access:uptime-read'],
security: {
authz: {
requiredPrivileges: ['uptime-read'],
},
},
handler: async ({ uptimeEsClient, request, response }): Promise<any> => {
const { dateRangeStart, dateRangeEnd, filters, pagination, statusFilter, pageSize, query } =