mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 04:12:10 +00:00
Team dashboards (#14159)
This commit is contained in:
parent
25f8970b2c
commit
40274b4a93
12 changed files with 148 additions and 47 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue