summaryrefslogtreecommitdiffstats
path: root/models/repo_permission.go
diff options
context:
space:
mode:
authorkolaente <konrad@kola-entertainments.de>2019-03-24 10:08:45 +0100
committerLauris BH <lauris@nix.lv>2019-03-24 11:08:45 +0200
commitfb2ea06bb18fc3bb68bab5022f8a201c32344cb8 (patch)
tree9879973cc1d355cec76bf82b4e6bb92b7b84f249 /models/repo_permission.go
parentb48be1958c8334db77c641f574feca1b26d35a19 (diff)
downloadgitea-fb2ea06bb18fc3bb68bab5022f8a201c32344cb8.tar.gz
gitea-fb2ea06bb18fc3bb68bab5022f8a201c32344cb8.zip
Fixed unitTypeCode not being used (#6419)
Diffstat (limited to 'models/repo_permission.go')
-rw-r--r--models/repo_permission.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo_permission.go b/models/repo_permission.go
index 418cd77f2d..eb0628cbd1 100644
--- a/models/repo_permission.go
+++ b/models/repo_permission.go
@@ -238,7 +238,7 @@ func accessLevelUnit(e Engine, user *User, repo *Repository, unitType UnitType)
if err != nil {
return AccessModeNone, err
}
- return perm.UnitAccessMode(UnitTypeCode), nil
+ return perm.UnitAccessMode(unitType), nil
}
func hasAccessUnit(e Engine, user *User, repo *Repository, unitType UnitType, testMode AccessMode) (bool, error) {