Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@ public Response createFromYamlAndFormatAndAppId(String yaml, String format, Stri
}

protected Response createFromYaml(String yaml, String format, Optional<String> appId) {
// Pre check DEPLOY_APPLICATION before computing `spec`
if (!Entitlements.isEntitled(mgmt().getEntitlementManager(), Entitlements.DEPLOY_APPLICATION, null)) {
throw WebResourceUtils.forbidden(AUTHORIZATION_ERR_MSG, Entitlements.getEntitlementContext().user(), yaml);
}
// First of all, see if it's a URL
Preconditions.checkNotNull(yaml, "Blueprint must not be null");
URI uri = null;
Expand Down Expand Up @@ -545,6 +549,10 @@ public Response createWithFormatMultipart(String plan, String format) {
}

public Response createWithFormat(String inputToAutodetectType, String format) {
// Pre check DEPLOY_APPLICATION before computing `spec`
if (!Entitlements.isEntitled(mgmt().getEntitlementManager(), Entitlements.DEPLOY_APPLICATION, null)) {
throw WebResourceUtils.forbidden(AUTHORIZATION_ERR_MSG, Entitlements.getEntitlementContext().user(), inputToAutodetectType);
}
if (format!=null) format = format.trim();
log.debug("Creating app from autodetecting input");

Expand Down