diff options
author | Lauris BH <lauris@nix.lv> | 2017-07-17 05:04:43 +0300 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-07-17 10:04:43 +0800 |
commit | f33e6ae09ec27e898bb8f2cc44d587ea3b8e0dee (patch) | |
tree | 2c6a268356fcb5fd73ee468055869b129b14c6ed /modules/context/repo.go | |
parent | 047a67a90b455a077e8b6f6deaad6b7ec4b50810 (diff) | |
download | gitea-f33e6ae09ec27e898bb8f2cc44d587ea3b8e0dee.tar.gz gitea-f33e6ae09ec27e898bb8f2cc44d587ea3b8e0dee.zip |
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
Diffstat (limited to 'modules/context/repo.go')
-rw-r--r-- | modules/context/repo.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/context/repo.go b/modules/context/repo.go index d636496f50..3dface7da7 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -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 } |