Browse Source

提交代码。

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

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

@@ -404,7 +404,7 @@ func ShowModelTemplate(ctx *context.Context) {

func isQueryRight(ctx *context.Context) bool {
if ctx.Repo.Repository.IsPrivate {
if ctx.User.IsAdmin || ctx.Repo.IsAdmin() || ctx.Repo.IsOwner() || ctx.Repo.CanRead(models.UnitTypeCloudBrain) {
if ctx.Repo.CanRead(models.UnitTypeCloudBrain) || ctx.User.IsAdmin || ctx.Repo.IsAdmin() || ctx.Repo.IsOwner() {
return true
}
return false
@@ -447,6 +447,8 @@ func ShowModelPageInfo(ctx *context.Context) {
}

for _, model := range modelResult {
log.Info("model=" + model.Name)
log.Info("model.UserId=" + fmt.Sprint(model.UserId))
model.IsCanOper = isOper(ctx, model.UserId)
}



Loading…
Cancel
Save