Browse Source

Merge pull request '读权限用户应无法删除云脑任务' (#550) from fix-530 into V20211018

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/550
tags/v1.21.12.1
lewis 4 years ago
parent
commit
0d19dae776
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      models/cloudbrain.go

+ 1
- 1
models/cloudbrain.go View File

@@ -687,7 +687,7 @@ func CanDelJob(isSigned bool, user *User, job *CloudbrainInfo) bool {
return false
}

if user.ID == job.UserID || user.IsAdmin || permission.AccessMode >= AccessModeAdmin {
if (user.ID == job.UserID && permission.AccessMode >= AccessModeWrite) || user.IsAdmin || permission.AccessMode >= AccessModeAdmin {
return true
}
return false


Loading…
Cancel
Save