use of com.sequenceiq.cloudbreak.api.endpoint.v4.autoscales.response.AuthorizeForAutoscaleV4Response in project cloudbreak by hortonworks.
the class AutoscaleV4Controller method authorizeForAutoscale.
@Override
@InternalOnly
public AuthorizeForAutoscaleV4Response authorizeForAutoscale(@TenantAwareParam String crn, String userId, String tenant, String permission) {
AuthorizeForAutoscaleV4Response response = new AuthorizeForAutoscaleV4Response();
try {
restRequestThreadLocalService.setCloudbreakUserByUsernameAndTenant(userId, tenant);
// TODO check permission explicitly
Stack stack = stackService.getByCrn(crn);
response.setSuccess(true);
} catch (RuntimeException ignore) {
response.setSuccess(false);
}
return response;
}
Aggregations