mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 13:28:25 +00:00 
			
		
		
		
	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:
		@@ -93,6 +93,12 @@ func CreateRepositoryByExample(ctx context.Context, doer, u *user_model.User, re
 | 
			
		||||
					AllowRebaseUpdate: true,
 | 
			
		||||
				},
 | 
			
		||||
			})
 | 
			
		||||
		} else if tp == unit.TypeProjects {
 | 
			
		||||
			units = append(units, repo_model.RepoUnit{
 | 
			
		||||
				RepoID: repo.ID,
 | 
			
		||||
				Type:   tp,
 | 
			
		||||
				Config: &repo_model.ProjectsConfig{ProjectsMode: repo_model.ProjectsModeAll},
 | 
			
		||||
			})
 | 
			
		||||
		} else {
 | 
			
		||||
			units = append(units, repo_model.RepoUnit{
 | 
			
		||||
				RepoID: repo.ID,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user