Browse Source

提交代码。

Signed-off-by: zouap <zouap@pcl.ac.cn>
pull/1406/head
zouap 3 years ago
parent
commit
66437f53f1
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

@@ -211,6 +211,9 @@ func DeleteModel(ctx *context.Context) {
}

func isCanDelete(ctx *context.Context, model *models.AiModelManage) bool {
if ctx.User == nil {
return false
}
if ctx.User.IsAdmin || ctx.User.ID == model.UserId {
return true
}


Loading…
Cancel
Save