Fixed unitTypeCode not being used (#6419) (#6422)

This commit is contained in:
kolaente 2019-03-24 18:31:34 +01:00 committed by zeripath
parent c5ec66a8a3
commit 93e8174e4e
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ func accessLevelUnit(e Engine, user *User, repo *Repository, unitType UnitType)
if err != nil { if err != nil {
return AccessModeNone, err 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) { func hasAccessUnit(e Engine, user *User, repo *Repository, unitType UnitType, testMode AccessMode) (bool, error) {