Skip to content

Commit e2ec4b7

Browse files
authored
fix bu ong normal user visit public repo (#1984)
1 parent 8fc6474 commit e2ec4b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/repo.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ func (repo *Repository) getUnitsByUserID(e Engine, userID int64, isAdmin bool) (
359359
return err
360360
}
361361

362-
if !repo.Owner.IsOrganization() || userID == 0 || isAdmin {
362+
if !repo.Owner.IsOrganization() || userID == 0 || isAdmin || !repo.IsPrivate {
363363
return nil
364364
}
365365

0 commit comments

Comments
 (0)