aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkolaente2019-03-24 18:31:01 +0100
committerzeripath2019-03-24 17:31:01 +0000
commit84f41d9d929c03bf43b68e24ab852897695c5206 (patch)
tree39b45cccec96f306cb070b6a6db67af02c0e8412
parentacb9ae4c4db51b2fb9604ff75d22ff92c7b6ded0 (diff)
Fixed unitTypeCode not being used (#6423)
-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 418cd77f2..eb0628cbd 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) {