parent
eab8c1f7bf
commit
e94dba7de0
|
@ -2067,6 +2067,12 @@ public class ApiAutomationService {
|
|||
ApiScenarioWithBLOBs bloBs = getDto(object.getString("id"));
|
||||
if (bloBs == null) {
|
||||
object.put("referenced", "Copy");
|
||||
}else{
|
||||
CheckPermissionService checkPermissionService = CommonBeanFactory.getBean(CheckPermissionService.class);
|
||||
Set<String> userRelatedProjectIds = checkPermissionService.getUserRelatedProjectIds();
|
||||
if(!userRelatedProjectIds.contains(bloBs.getProjectId())){
|
||||
object.put("referenced", "Copy");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -688,11 +688,11 @@ export default {
|
|||
if (response.data) {
|
||||
workspaceId = response.data.workspaceId;
|
||||
isTurnSpace = true;
|
||||
this.gotoTurn(resource, workspaceId, isTurnSpace);
|
||||
this.checkPermission(resource, workspaceId, isTurnSpace);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.gotoTurn(resource, workspaceId, isTurnSpace);
|
||||
this.checkPermission(resource, workspaceId, isTurnSpace);
|
||||
}
|
||||
},
|
||||
clickCase(resource) {
|
||||
|
@ -757,6 +757,17 @@ export default {
|
|||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
checkPermission(resource, workspaceId, isTurnSpace){
|
||||
this.$get('/project/getOwnerProjectIds', res => {
|
||||
const project = res.data.find(p => p === resource.projectId);
|
||||
if(!project){
|
||||
this.$warning(this.$t('commons.no_permission'));
|
||||
}else{
|
||||
this.gotoTurn(resource, workspaceId, isTurnSpace)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -264,11 +264,11 @@ export default {
|
|||
if (response.data) {
|
||||
workspaceId = response.data.workspaceId;
|
||||
isTurnSpace = true;
|
||||
this.gotoTurn(resource,workspaceId,isTurnSpace);
|
||||
this.checkPermission(resource,workspaceId,isTurnSpace);
|
||||
}
|
||||
});
|
||||
}else {
|
||||
this.gotoTurn(resource,workspaceId,isTurnSpace);
|
||||
this.checkPermission(resource,workspaceId,isTurnSpace);
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -280,6 +280,16 @@ export default {
|
|||
if(isTurnSpace){
|
||||
window.open(automationData.href, '_blank');
|
||||
}
|
||||
},
|
||||
checkPermission(resource,workspaceId,isTurnSpace){
|
||||
this.$get('/project/getOwnerProjectIds', res => {
|
||||
const project = res.data.find(p => p === resource.projectId);
|
||||
if(!project){
|
||||
this.$warning(this.$t('commons.no_permission'));
|
||||
}else{
|
||||
this.gotoTurn(resource,workspaceId,isTurnSpace)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue