mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
(cherry picked from commit 71c4e74c8e
)
Co-authored-by: Shahzad <shahzad.muhammad@elastic.co>
This commit is contained in:
parent
808ae20348
commit
ed6abc24fb
1 changed files with 4 additions and 2 deletions
|
@ -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,
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue