From 2926050886f70d14c931fc86d1ae465ca7597e10 Mon Sep 17 00:00:00 2001 From: "Determe, Sebastien (sd378r)" Date: Fri, 18 May 2018 18:00:17 +0200 Subject: 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) --- src/main/java/org/onap/clamp/clds/service/CldsService.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/main/java') 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); -- cgit 1.2.3-korg