Skip to content

Commit

Permalink
[Synthetics] Enable isAllowed by default on premises (#138820) (#138831)
Browse files Browse the repository at this point in the history
(cherry picked from commit 71c4e74)

Co-authored-by: Shahzad <shahzad.muhammad@elastic.co>
  • Loading branch information
kibanamachine and shahzad31 authored Aug 15, 2022
1 parent 808ae20 commit ed6abc2
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ export const getServiceAllowedRoute: SyntheticsRestApiRouteFactory = () => ({
method: 'GET',
path: API_URLS.SERVICE_ALLOWED,
validate: {},
handler: async ({ syntheticsMonitorClient }): Promise<any> => {
handler: async ({ syntheticsMonitorClient, server }): Promise<any> => {
const isCloud = Boolean(server.cloud?.isCloudEnabled);

return {
serviceAllowed: syntheticsMonitorClient.syntheticsService.isAllowed,
serviceAllowed: isCloud ? syntheticsMonitorClient.syntheticsService.isAllowed : true,
signupUrl: syntheticsMonitorClient.syntheticsService.signupUrl,
};
},
Expand Down

0 comments on commit ed6abc2

Please sign in to comment.