forked from forgejo/forgejo
Add units to team (#947)
* add units to team * fix lint * finish team setting backend * finished permission controll on routes * fix import blank line * add unit check on ssh/http pull and push and fix test failed * fix fixtures data * remove unused code
This commit is contained in:
parent
5db5e16ab6
commit
fd6034aaf2
18 changed files with 366 additions and 113 deletions
|
@ -135,3 +135,11 @@ func (r *RepoUnit) ExternalWikiConfig() *ExternalWikiConfig {
|
|||
func (r *RepoUnit) ExternalTrackerConfig() *ExternalTrackerConfig {
|
||||
return r.Config.(*ExternalTrackerConfig)
|
||||
}
|
||||
|
||||
func getUnitsByRepoID(e Engine, repoID int64) (units []*RepoUnit, err error) {
|
||||
return units, e.Where("repo_id = ?", repoID).Find(&units)
|
||||
}
|
||||
|
||||
func getUnitsByRepoIDAndIDs(e Engine, repoID int64, types []UnitType) (units []*RepoUnit, err error) {
|
||||
return units, e.Where("repo_id = ?", repoID).In("`type`", types).Find(&units)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue