diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2022-10-07 23:06:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-07 22:06:04 +0100 |
commit | 223556073c51b34f2ccca7c1036552a4807d1f42 (patch) | |
tree | 5860100f8b08fdeb7a7268c39438c0c998a65fa0 /routers/web/feed | |
parent | 7d2545d183058f98e96efb1bd972c2b841eebf43 (diff) | |
download | gitea-223556073c51b34f2ccca7c1036552a4807d1f42.tar.gz gitea-223556073c51b34f2ccca7c1036552a4807d1f42.zip |
Show private data in feeds (#21369)
Show private data in feeds for admins and matching users.
Diffstat (limited to 'routers/web/feed')
-rw-r--r-- | routers/web/feed/profile.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/web/feed/profile.go b/routers/web/feed/profile.go index c467f7412a..0e11f210ce 100644 --- a/routers/web/feed/profile.go +++ b/routers/web/feed/profile.go @@ -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"), |