From 93e8174e4eaf320f89162ae4dd1d2686726cd21e Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 24 Mar 2019 18:31:34 +0100 Subject: [PATCH] Fixed unitTypeCode not being used (#6419) (#6422) --- models/repo_permission.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {