Skip to content

Commit

Permalink
[Synthetics] Enable isAllowed by default on premises (elastic#138820)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 authored Aug 15, 2022
1 parent c9a30dc commit 71c4e74
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 71c4e74

Please sign in to comment.