Skip to content

[19.0][FIX] impersonate_login: forward-port attachment and back-to-origin fixes - #1081

Open
chaule97 wants to merge 3 commits into
OCA:19.0from
chaule97:19.0-fix-impersonate_login-fwport-18
Open

chaule97 wants to merge 3 commits into
OCA:19.0from
chaule97:19.0-fix-impersonate_login-fwport-18

Conversation

@chaule97

Copy link
Copy Markdown

Forward-port of two 18.0 fixes, original authors kept:

Both bugs reproduce on 19.0: an attachment created with no res_model while impersonating can't be read back (AccessError). Going back to the original user raises an AccessError when the impersonated user can't read the impersonator's contact, and the session stays impersonated. Adds regression tests for both; they fail without the fixes.

Assisted-by: Claude Code (claude-opus-5-5)

gdgellatly and others added 3 commits November 30, 2026 10:37
Avoid rewriting create_uid/write_uid on ir.attachment during impersonation.
Temporary report/email attachments may be created without res_model/res_id and
core access checks rely on creator ownership for read access in that case.
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @Kev-Roche,
some modules you are maintaining are being modified, check this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:impersonate_login Module impersonate_login series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants