mirror of
https://gitee.com/gitea/gitea
synced 2025-11-04 00:20:25 +08:00
fix bu ong normal user visit public repo (#1984)
This commit is contained in:
@@ -359,7 +359,7 @@ func (repo *Repository) getUnitsByUserID(e Engine, userID int64, isAdmin bool) (
|
||||
return err
|
||||
}
|
||||
|
||||
if !repo.Owner.IsOrganization() || userID == 0 || isAdmin {
|
||||
if !repo.Owner.IsOrganization() || userID == 0 || isAdmin || !repo.IsPrivate {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user