forked from forgejo/forgejo
Only show activities for repositories on dashboard, that the user has access to
This commit is contained in:
parent
90e9e3c89d
commit
45db167f7a
3 changed files with 24 additions and 7 deletions
|
@ -51,8 +51,8 @@ func getDashboardContextUser(ctx *middleware.Context) *models.User {
|
|||
return ctxUser
|
||||
}
|
||||
|
||||
func retrieveFeeds(ctx *middleware.Context, uid, offset int64, isProfile bool) {
|
||||
actions, err := models.GetFeeds(uid, offset, isProfile)
|
||||
func retrieveFeeds(ctx *middleware.Context, ctxUserID, userID, offset int64, isProfile bool) {
|
||||
actions, err := models.GetFeeds(ctxUserID, userID, offset, isProfile)
|
||||
if err != nil {
|
||||
ctx.Handle(500, "GetFeeds", err)
|
||||
return
|
||||
|
@ -140,7 +140,7 @@ func Dashboard(ctx *middleware.Context) {
|
|||
ctx.Data["MirrorCount"] = len(mirrors)
|
||||
ctx.Data["Mirrors"] = mirrors
|
||||
|
||||
retrieveFeeds(ctx, ctxUser.Id, 0, false)
|
||||
retrieveFeeds(ctx, ctx.User.Id, ctxUser.Id, 0, false)
|
||||
if ctx.Written() {
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue