Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit c21fb55

Browse files
author
Corneil du Plessis
committed
Add role for POST runtime/apps/
Improve logging for StreamDeployerUtil
1 parent 15a2178 commit c21fb55

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/stream/StreamDeployerUtil.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,19 @@ public static DeploymentState aggregateState(Set<DeploymentState> states) {
5050
}
5151
DeploymentState result = DeploymentState.partial;
5252
if (states.isEmpty() || states.contains(DeploymentState.error)) {
53-
logger.debug("aggregateState: Returning " + DeploymentState.error);
5453
result = DeploymentState.error;
5554
}
5655
else if (states.contains(DeploymentState.deployed) && states.contains(DeploymentState.failed)) {
57-
logger.debug("aggregateState: Returning " + DeploymentState.partial);
5856
result = DeploymentState.partial;
5957
}
6058
else if (states.contains(DeploymentState.failed)) {
61-
logger.debug("aggregateState: Returning " + DeploymentState.failed);
6259
result = DeploymentState.failed;
6360
}
6461
else if (states.contains(DeploymentState.deploying)) {
65-
logger.debug("aggregateState: Returning " + DeploymentState.deploying);
6662
result = DeploymentState.deploying;
6763
}
6864

69-
logger.debug("aggregateState: Returning " + DeploymentState.partial);
65+
logger.debug("aggregateState: Returning " + result);
7066
return result;
7167
}
7268
}

spring-cloud-dataflow-server-core/src/main/resources/META-INF/dataflow-server-defaults.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ spring:
175175
- GET /runtime/streams/** => hasRole('ROLE_VIEW')
176176
- GET /runtime/apps => hasRole('ROLE_VIEW')
177177
- GET /runtime/apps/** => hasRole('ROLE_VIEW')
178+
- POST /runtime/apps/** => hasRole('ROLE_CREATE')
178179

179180
# Schema Versions
180181
- GET /schema/versions => hasRole('ROLE_VIEW')

0 commit comments

Comments
 (0)