Skip to content

Commit

Permalink
Show private data in feeds (go-gitea#21369)
Browse files Browse the repository at this point in the history
Show private data in feeds for admins and matching users.
  • Loading branch information
KN4CK3R authored Oct 7, 2022
1 parent 7d2545d commit 2235560
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion routers/web/feed/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ func ShowUserFeedAtom(ctx *context.Context) {

// showUserFeed show user activity as RSS / Atom feed
func showUserFeed(ctx *context.Context, formatType string) {
includePrivate := ctx.IsSigned && (ctx.Doer.IsAdmin || ctx.Doer.ID == ctx.ContextUser.ID)

actions, err := activities_model.GetFeeds(ctx, activities_model.GetFeedsOptions{
RequestedUser: ctx.ContextUser,
Actor: ctx.Doer,
IncludePrivate: false,
IncludePrivate: includePrivate,
OnlyPerformedBy: !ctx.ContextUser.IsOrganization(),
IncludeDeleted: false,
Date: ctx.FormString("date"),
Expand Down

0 comments on commit 2235560

Please sign in to comment.