mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
Team dashboards (#14159)
This commit is contained in:
@@ -138,6 +138,7 @@ type SearchRepoOptions struct {
|
||||
Keyword string
|
||||
OwnerID int64
|
||||
PriorityOwnerID int64
|
||||
TeamID int64
|
||||
OrderBy SearchOrderBy
|
||||
Private bool // Include private repositories in results
|
||||
StarredByID int64
|
||||
@@ -294,6 +295,10 @@ func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond {
|
||||
cond = cond.And(accessCond)
|
||||
}
|
||||
|
||||
if opts.TeamID > 0 {
|
||||
cond = cond.And(builder.In("`repository`.id", builder.Select("`team_repo`.repo_id").From("team_repo").Where(builder.Eq{"`team_repo`.team_id": opts.TeamID})))
|
||||
}
|
||||
|
||||
if opts.Keyword != "" {
|
||||
// separate keyword
|
||||
var subQueryCond = builder.NewCond()
|
||||
|
Reference in New Issue
Block a user