Skip to content

Navigation Menu

Sign in
Sign up

fix(activity): reset the current user and release the teams session - #2908

Open
solracsf wants to merge 1 commit into
master from
fix/activity-publishing-context
Open

fix(activity): reset the current user and release the teams session #2908
solracsf wants to merge 1 commit into
master from
fix/activity-publishing-context

Conversation

@solracsf

@solracsf solracsf commented Sep 7, 2026

Copy link
Copy Markdown
Member

NotificationGenerator::prepare() sets the activity manager's current user and reset it only on the happy path, so a provider that throws leaves another user's identity installed for the rest of the request — which under cron means the rest of the run. 216a333 fixed the same thing in MailQueueHandler and DigestSender; this is the third call site.

FilesHooks::shareWithTeam() opens a Circles super session and never closes it, so every share to a team leaves the request running elevated. Now paired with stopSession() in a finally, the way groupfolders does it in FolderManager and UserMappingManager. No test: OCA\Circles\CirclesManager isn't resolvable in the test environment, which is why FilesHooksTest sets $teamManager = null.

Also adds the regression test c7516b8 didn't ship for skipping incompletely built events.

Verified on Nextcloud 36 against MariaDB 11.4, PostgreSQL 16 and S3 primary storage.

`NotificationGenerator::prepare()` set the activity manager's current user
and reset it only on the happy path, so a provider that threw left another
user's identity installed for the rest of the request. MailQueueHandler and
DigestSender were covered by 216a333; this is the third call site.
`FilesHooks::shareWithTeam()` opened a Circles super session and never
closed it, so every share to a team left the request running elevated. It
is now paired with stopSession() in a finally, matching how groupfolders
handles the same API.
Also adds the regression test that c7516b8 did not ship for skipping
incompletely built events.
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /