mirror of
https://github.com/go-gitea/gitea
synced 2025-08-26 03:18:28 +00:00
* Ensure that feeds are appropriately restricted * Placate golangci-lint
This commit is contained in:
@@ -142,11 +142,17 @@ func Dashboard(ctx *context.Context) {
|
||||
ctx.Data["MirrorCount"] = len(mirrors)
|
||||
ctx.Data["Mirrors"] = mirrors
|
||||
|
||||
requestingUserID := int64(0)
|
||||
if ctx.User != nil {
|
||||
requestingUserID = ctx.User.ID
|
||||
}
|
||||
|
||||
retrieveFeeds(ctx, models.GetFeedsOptions{
|
||||
RequestedUser: ctxUser,
|
||||
IncludePrivate: true,
|
||||
OnlyPerformedBy: false,
|
||||
IncludeDeleted: false,
|
||||
RequestedUser: ctxUser,
|
||||
RequestingUserID: requestingUserID,
|
||||
IncludePrivate: true,
|
||||
OnlyPerformedBy: false,
|
||||
IncludeDeleted: false,
|
||||
})
|
||||
|
||||
if ctx.Written() {
|
||||
|
@@ -156,14 +156,20 @@ func Profile(ctx *context.Context) {
|
||||
orderBy = models.SearchOrderByRecentUpdated
|
||||
}
|
||||
|
||||
requestingUserID := int64(0)
|
||||
if ctx.User != nil {
|
||||
requestingUserID = ctx.User.ID
|
||||
}
|
||||
|
||||
keyword := strings.Trim(ctx.Query("q"), " ")
|
||||
ctx.Data["Keyword"] = keyword
|
||||
switch tab {
|
||||
case "activity":
|
||||
retrieveFeeds(ctx, models.GetFeedsOptions{RequestedUser: ctxUser,
|
||||
IncludePrivate: showPrivate,
|
||||
OnlyPerformedBy: true,
|
||||
IncludeDeleted: false,
|
||||
RequestingUserID: requestingUserID,
|
||||
IncludePrivate: showPrivate,
|
||||
OnlyPerformedBy: true,
|
||||
IncludeDeleted: false,
|
||||
})
|
||||
if ctx.Written() {
|
||||
return
|
||||
|
Reference in New Issue
Block a user