Skip to content

Commit

Permalink
[Synthetics] enable api key when devUrl is set (#156059)
Browse files Browse the repository at this point in the history
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
devcorpio and kibanamachine authored May 3, 2023
1 parent 2c491b5 commit c11dc28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export const getSyntheticsEnablementRoute: SyntheticsRestApiRouteFactory = (libs
});
}
const regenerationRequired = !isEnabled || !isValid;
if (canEnable && regenerationRequired && server.config.service?.manifestUrl) {
const shouldEnableApiKey =
server.config.service?.manifestUrl || server.config.service?.devUrl;
if (canEnable && regenerationRequired && shouldEnableApiKey) {
await generateAndSaveServiceAPIKey({
request,
authSavedObjectsClient: savedObjectsClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export const getSyntheticsEnablement = async ({ server }: { server: UptimeServer

const { canEnable, canManageApiKeys } = hasPrivileges;

if (!config.service?.manifestUrl) {
if (!config.service?.manifestUrl && !config.service?.devUrl) {
return {
canEnable: true,
canManageApiKeys,
Expand Down

0 comments on commit c11dc28

Please sign in to comment.