Skip to content

Commit 93e8174

Browse files
kolaentezeripath
authored andcommitted
Fixed unitTypeCode not being used (#6419) (#6422)
1 parent c5ec66a commit 93e8174

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/repo_permission.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func accessLevelUnit(e Engine, user *User, repo *Repository, unitType UnitType)
238238
if err != nil {
239239
return AccessModeNone, err
240240
}
241-
return perm.UnitAccessMode(UnitTypeCode), nil
241+
return perm.UnitAccessMode(unitType), nil
242242
}
243243

244244
func hasAccessUnit(e Engine, user *User, repo *Repository, unitType UnitType, testMode AccessMode) (bool, error) {

0 commit comments

Comments
 (0)