Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.21.12.1^2
zouap 3 years ago
parent
commit
6ed05c144f
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      routers/repo/ai_model_manage.go

+ 3
- 0
routers/repo/ai_model_manage.go View File

@@ -414,6 +414,9 @@ func isQueryRight(ctx *context.Context) bool {
}

func isOper(ctx *context.Context, modelUserId int64) bool {
if ctx.User == nil {
return false
}
if ctx.User.IsAdmin || ctx.Repo.IsAdmin() || ctx.Repo.IsOwner() || ctx.User.ID == modelUserId {
return true
}


Loading…
Cancel
Save