Enable/disable owner and repo projects independently (#28805)
Part of #23318
Add menu in repo settings to allow for repo admin to decide not just if
projects are enabled or disabled per repo, but also which kind of
projects (repo-level/owner-level) are enabled. If repo projects
disabled, don't show the projects tab.

---------
Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
parent
8553b4600e
commit
fe6792dff3
16 changed files with 212 additions and 63 deletions
|
@ -411,6 +411,11 @@ func (repo *Repository) MustGetUnit(ctx context.Context, tp unit.Type) *RepoUnit
|
|||
Type: tp,
|
||||
Config: new(ActionsConfig),
|
||||
}
|
||||
} else if tp == unit.TypeProjects {
|
||||
return &RepoUnit{
|
||||
Type: tp,
|
||||
Config: new(ProjectsConfig),
|
||||
}
|
||||
}
|
||||
|
||||
return &RepoUnit{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue