|
|
|
@@ -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) |
|
|
|
} |
|
|
|
|
|
|
|
|