Skip to content

Commit

Permalink
Fixed unitTypeCode not being used (#6419)
Browse files Browse the repository at this point in the history
  • Loading branch information
kolaente authored and lafriks committed Mar 24, 2019
1 parent b48be19 commit fb2ea06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/repo_permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fb2ea06

Please sign in to comment.