We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b257e04 commit f80caa5Copy full SHA for f80caa5
modules/context/repo.go
@@ -212,6 +212,17 @@ func RedirectToRepo(ctx *Context, redirectRepoID int64) {
212
213
func repoAssignment(ctx *Context, repo *models.Repository) {
214
var err error
215
+ if err = repo.GetOwner(); err != nil {
216
+ ctx.ServerError("GetOwner", err)
217
+ return
218
+ }
219
+
220
+ if repo.Owner.IsOrganization() {
221
+ if !models.HasOrgVisible(repo.Owner, ctx.User) {
222
+ ctx.NotFound("HasOrgVisible", nil)
223
224
225
226
ctx.Repo.Permission, err = models.GetUserRepoPermission(repo, ctx.User)
227
if err != nil {
228
ctx.ServerError("GetUserRepoPermission", err)
0 commit comments