aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-05-18 18:00:17 +0200
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-05-18 18:00:17 +0200
commit2926050886f70d14c931fc86d1ae465ca7597e10 (patch)
tree29fc1b1a163d2cbe6cf33044db60f701013fbba0 /src/main
parent1b71aad66f71e7f46d84268afbd589315363991d (diff)
Fix Deploy failing
Fix deploy/undeploy failing when cookies have expired on UI side, it prevents clamp from getting the right ServiceTypeId Issue-ID: CLAMP-166 Change-Id: If9ae0620f6c003fa2b46e6d282681c66f10b92c5 Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/clamp/clds/service/CldsService.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/org/onap/clamp/clds/service/CldsService.java b/src/main/java/org/onap/clamp/clds/service/CldsService.java
index 888b782e1..9b68845c0 100644
--- a/src/main/java/org/onap/clamp/clds/service/CldsService.java
+++ b/src/main/java/org/onap/clamp/clds/service/CldsService.java
@@ -835,6 +835,10 @@ public class CldsService extends SecureServiceBase {
fillInCldsModel(model);
String bpmnJson = cldsBpmnTransformer.doXslTransformToString(model.getBpmnText());
logger.info("PUT bpmnJson={}", bpmnJson);
+ SecureServicePermission permisionManage = SecureServicePermission.create(cldsPermissionTypeClManage,
+ cldsPermissionInstance, CldsEvent.ACTION_DEPLOY);
+ isAuthorized(permisionManage);
+ isAuthorizedForVf(model);
ModelProperties modelProp = new ModelProperties(modelName, model.getControlName(), CldsEvent.ACTION_DEPLOY,
false, bpmnJson, model.getPropText());
checkForDuplicateServiceVf(modelName, model.getPropText());
@@ -890,6 +894,10 @@ public class CldsService extends SecureServiceBase {
LoggingUtils.setRequestContext("CldsService: Undeploy model", getPrincipalName());
Boolean errorCase = false;
try {
+ SecureServicePermission permisionManage = SecureServicePermission.create(cldsPermissionTypeClManage,
+ cldsPermissionInstance, CldsEvent.ACTION_UNDEPLOY);
+ isAuthorized(permisionManage);
+ isAuthorizedForVf(model);
String operationStatusUndeployUrl = dcaeDispatcherServices.deleteExistingDeployment(model.getDeploymentId(),
model.getTypeId());
String operationStatus = dcaeDispatcherServices.getOperationStatusWithRetry(operationStatusUndeployUrl);