From d775c3b22bce3edbc31a23539904ee0009b53dd8 Mon Sep 17 00:00:00 2001 From: Manush Dodunekov Date: Sat, 11 Jan 2020 01:58:45 +0100 Subject: [PATCH] fix yet another thinko --- models/org.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/org.go b/models/org.go index 489bb9fa6f..d79c0db84e 100644 --- a/models/org.go +++ b/models/org.go @@ -774,7 +774,7 @@ func (org *User) accessibleReposEnv(e Engine, userID int64) (AccessibleReposEnvi func (env *accessibleReposEnv) cond() builder.Cond { var cond = builder.NewCond() - if env.user != nil && !env.user.IsRestricted { + if env.user == nil || !env.user.IsRestricted { cond = cond.Or(builder.Eq{ "`repository`.owner_id": env.org.ID, "`repository`.is_private": false,