Browse Source

私有及公有状态颜色统一

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

+ 6
- 2
routers/repo/ai_model_manage.go View File

@@ -1022,9 +1022,13 @@ func isQueryPrivateModel(ctx *context.Context) bool {
}
isCollaborator, err := ctx.Repo.Repository.IsCollaborator(ctx.User.ID)
if err != nil {
log.Info("query error.")
log.Info("query IsCollaborator error." + err.Error())
}
isTeamMember, err := ctx.Repo.Repository.IsInRepoTeam(ctx.User.ID)
if err != nil {
log.Info("query IsInRepoTeam error." + err.Error())
}
if ctx.User.IsAdmin || isCollaborator {
if ctx.User.IsAdmin || isCollaborator || isTeamMember {
return true
}
if ctx.Repo.IsOwner() {


Loading…
Cancel
Save