summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-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) {