mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 11:28:24 +00:00 
			
		
		
		
	Remove unit types commits and settings (#2161)
* Remove unit types commits and settings * Can not limit units in administrator teams * Limit changing units only to teams with read and write access mode * Small code optimization
This commit is contained in:
		| @@ -348,6 +348,9 @@ func RepoAssignment() macaron.Handler { | ||||
| 					ctx.Repo.PullRequest.HeadInfo = ctx.Repo.BranchName | ||||
| 				} | ||||
| 			} | ||||
|  | ||||
| 			// Reset repo units as otherwise user specific units wont be loaded later | ||||
| 			ctx.Repo.Repository.Units = nil | ||||
| 		} | ||||
| 		ctx.Data["PullRequestCtx"] = ctx.Repo.PullRequest | ||||
|  | ||||
| @@ -549,10 +552,8 @@ func UnitTypes() macaron.Handler { | ||||
| 		ctx.Data["UnitTypeCode"] = models.UnitTypeCode | ||||
| 		ctx.Data["UnitTypeIssues"] = models.UnitTypeIssues | ||||
| 		ctx.Data["UnitTypePullRequests"] = models.UnitTypePullRequests | ||||
| 		ctx.Data["UnitTypeCommits"] = models.UnitTypeCommits | ||||
| 		ctx.Data["UnitTypeReleases"] = models.UnitTypeReleases | ||||
| 		ctx.Data["UnitTypeWiki"] = models.UnitTypeWiki | ||||
| 		ctx.Data["UnitTypeSettings"] = models.UnitTypeSettings | ||||
| 		ctx.Data["UnitTypeExternalWiki"] = models.UnitTypeExternalWiki | ||||
| 		ctx.Data["UnitTypeExternalTracker"] = models.UnitTypeExternalTracker | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user