mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Show private repository activities in dashboard if has access
This commit is contained in:
@@ -50,7 +50,7 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler {
|
||||
|
||||
// Collaborators who have write access can be seen as owners.
|
||||
if ctx.IsSigned {
|
||||
ctx.Repo.IsOwner, err = models.HasAccess(ctx.User.Name, repoName, models.AU_WRITABLE)
|
||||
ctx.Repo.IsOwner, err = models.HasAccess(ctx.User.Name, userName+"/"+repoName, models.AU_WRITABLE)
|
||||
if err != nil {
|
||||
ctx.Handle(500, "RepoAssignment(HasAccess)", err)
|
||||
return
|
||||
@@ -100,7 +100,7 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler {
|
||||
}
|
||||
|
||||
// Check access.
|
||||
if repo.IsPrivate {
|
||||
if repo.IsPrivate && !ctx.Repo.IsOwner {
|
||||
if ctx.User == nil {
|
||||
ctx.Handle(404, "RepoAssignment(HasAccess)", nil)
|
||||
return
|
||||
|
10
modules/workers/worker.go
Normal file
10
modules/workers/worker.go
Normal file
@@ -0,0 +1,10 @@
|
||||
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package workers
|
||||
|
||||
// Work represents a background work interface of any kind.
|
||||
type Work interface {
|
||||
Do() error
|
||||
}
|
Reference in New Issue
Block a user