|
|
|
@@ -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() { |
|
|
|
|