新增直接提示
This commit is contained in:
+36
@@ -99,6 +99,42 @@ public class ExtRepoFolderController extends JeroController<ExtRepoFolder, IExtR
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否允许增加同级文件夹
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "是否允许增加同级文件夹")
|
||||||
|
@ApiOperation(value = "是否允许增加同级文件夹", notes = "是否允许增加同级文件夹")
|
||||||
|
@PostMapping(value = "/isAllowSiblingFolder")
|
||||||
|
public Result<?> isAllowSiblingFolder(@RequestParam(name="id",required=true) String id,
|
||||||
|
@RequestParam(name = "cut", defaultValue = "cn") String cut,
|
||||||
|
HttpSession session) {
|
||||||
|
Result<ExtRepoFolder> result = new Result();
|
||||||
|
session.setAttribute("haveSuperiorManageAuth", false);
|
||||||
|
ExtRepoFolder folder = extRepoFolderService.queryById(id);
|
||||||
|
extRepoFolderService.haveSuperiorManageAuth(folder.getSupFolder(),session);
|
||||||
|
//上层是否有权限
|
||||||
|
boolean boo = (Boolean)session.getAttribute("haveSuperiorManageAuth");
|
||||||
|
if (boo || extRepoFolderService.haveManageAuth(id)) {
|
||||||
|
if (!boo) {
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
return result.error500("无法创建同级文件夹!请联系管理员!");
|
||||||
|
} else {
|
||||||
|
return result.error500("Unable to create a sibling folder ! Please Contact your administrator !");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (CutEnum.CN.getValue().equals(cut)) {
|
||||||
|
return result.error500("没有权限!");
|
||||||
|
} else {
|
||||||
|
return result.error500("You do not have permission !");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.success("");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -619,7 +619,23 @@ export default {
|
|||||||
let supFolder = ''
|
let supFolder = ''
|
||||||
this.supFolder = this.nodeItem.key
|
this.supFolder = this.nodeItem.key
|
||||||
this.addSub = false
|
this.addSub = false
|
||||||
this.menuRightVisible = true
|
let params = {}
|
||||||
|
let long = localStorage.getItem('language')
|
||||||
|
let cut = ''
|
||||||
|
if (long && long == 'zh-cn') {
|
||||||
|
this.cut = 'cn'
|
||||||
|
} else if (long && long == 'en-us') {
|
||||||
|
this.cut = 'en'
|
||||||
|
}
|
||||||
|
params.id = this.supFolder
|
||||||
|
params.cut = this.cut
|
||||||
|
postAction(`extRepo/extRepoFolder/isAllowSiblingFolder`, params).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.menuRightVisible = true
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
orgAdds(){
|
orgAdds(){
|
||||||
|
|||||||
Reference in New Issue
Block a user