ApplicationEnvironment[] aes = applicationEnvironmentService.getByApplicationId(applicationId);
String[] envIds = Arrays.stream(aes).map(ae -> ae.getId()).toArray(String[]::new);
resourcePermissionService.revokePermission(resourceTemplate, Subject.ENVIRONMENT, envIds);
return RestResponseBuilder.<Void>builder().build();
}
<BUG>private void checkAllAuthorizationsForApplicationsAndEnvironments(ApplicationEnvironmentAuthorizationUpdateRequest request, LocationResourceTemplate resource) {
if (request.getApplicationsToDelete() != null && request.getApplicationsToDelete().length > 0) {</BUG>
hasAuthorizationOrFailed(resource, Subject.APPLICATION, request.getApplicationsToDelete());
}
if (request.getEnvironmentsToDelete() != null && request.getEnvironmentsToDelete().length > 0) {

ApplicationEnvironment[] aes = applicationEnvironmentService.getByApplicationId(applicationId);
String[] envIds = Arrays.stream(aes).map(ae -> ae.getId()).toArray(String[]::new);
resourcePermissionService.revokePermission(resourceTemplate, Subject.ENVIRONMENT, envIds);
return RestResponseBuilder.<Void>builder().build();
}
private void checkAllAuthorizationsForApplicationsAndEnvironments(ApplicationEnvironmentAuthorizationUpdateRequest request, Location resource) {
if (request.getApplicationsToDelete() != null && request.getApplicationsToDelete().length > 0) {
hasAuthorizationOrFailed(resource, Subject.APPLICATION, request.getApplicationsToDelete());
}
if (request.getEnvironmentsToDelete() != null && request.getEnvironmentsToDelete().length > 0) {
