diff options
author | Determe, Sebastien (sd378r) <sd378r@intl.att.com> | 2018-05-18 18:00:17 +0200 |
---|---|---|
committer | Determe, Sebastien (sd378r) <sd378r@intl.att.com> | 2018-05-18 18:00:17 +0200 |
commit | 2926050886f70d14c931fc86d1ae465ca7597e10 (patch) | |
tree | 29fc1b1a163d2cbe6cf33044db60f701013fbba0 | |
parent | 1b71aad66f71e7f46d84268afbd589315363991d (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>
-rw-r--r-- | src/main/java/org/onap/clamp/clds/service/CldsService.java | 8 |
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 888b782e..9b68845c 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); |