Skip to content

Commit 2235560

Browse files
authored
Show private data in feeds (#21369)
Show private data in feeds for admins and matching users.
1 parent 7d2545d commit 2235560

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

routers/web/feed/profile.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ func ShowUserFeedAtom(ctx *context.Context) {
2626

2727
// showUserFeed show user activity as RSS / Atom feed
2828
func showUserFeed(ctx *context.Context, formatType string) {
29+
includePrivate := ctx.IsSigned && (ctx.Doer.IsAdmin || ctx.Doer.ID == ctx.ContextUser.ID)
30+
2931
actions, err := activities_model.GetFeeds(ctx, activities_model.GetFeedsOptions{
3032
RequestedUser: ctx.ContextUser,
3133
Actor: ctx.Doer,
32-
IncludePrivate: false,
34+
IncludePrivate: includePrivate,
3335
OnlyPerformedBy: !ctx.ContextUser.IsOrganization(),
3436
IncludeDeleted: false,
3537
Date: ctx.FormString("date"),

0 commit comments

Comments
 (0)