Fixed unitTypeCode not being used (#6419)

tokarchuk/v1.17
kolaente 6 years ago committed by Lauris BH
parent b48be1958c
commit fb2ea06bb1
  1. 2
      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) {

Loading…
Cancel
Save