mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-24 19:19:39 +08:00
Show private data in feeds (#21369)
Show private data in feeds for admins and matching users.
This commit is contained in:
parent
7d2545d183
commit
223556073c
@ -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"),
|
||||
|
Loading…
Reference in New Issue
Block a user