浏览代码

解决复制项目权限校验BUG

lifei6671 7 年之前
父节点
当前提交
5b5d150d8a
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      controllers/BookController.go

+ 5 - 0
controllers/BookController.go

@@ -512,6 +512,11 @@ func (c *BookController) Create() {
 //复制项目
 //复制项目
 func (c *BookController) Copy(){
 func (c *BookController) Copy(){
 	if c.Ctx.Input.IsPost() {
 	if c.Ctx.Input.IsPost() {
+		//检查是否有复制项目的权限
+		if _,err := c.IsPermission(); err != nil{
+			c.JsonResult(500,err.Error())
+		}
+
 		identify := strings.TrimSpace(c.GetString("identify", ""))
 		identify := strings.TrimSpace(c.GetString("identify", ""))
 		if identify == "" {
 		if identify == "" {
 			c.JsonResult(6001,"参数错误")
 			c.JsonResult(6001,"参数错误")