Skip to content

[FIX] Added missing .sudo or compute_sudo=True#441

Open
katyukha wants to merge 1 commit intoOCA:18.0from
katyukha:18.0-fix-security
Open

[FIX] Added missing .sudo or compute_sudo=True#441
katyukha wants to merge 1 commit intoOCA:18.0from
katyukha:18.0-fix-security

Conversation

@katyukha
Copy link
Copy Markdown
Contributor

@katyukha katyukha commented Mar 8, 2026

This PR adds _compute_sudo=True to compute methods that access system models like (ir.model, ir.model.fields, ...) to avoid unexpected access errors in user interface.

Also, this PR adds .sudo() when code accesses (reads) system models for same reasone.

This PR adds `_compute_sudo=True` to compute methods that access system
models like (ir.model, ir.model.fields, ...) to avoid unexpected access
errors in user interface.

Also, this PR adds `.sudo()` when code accesses (reads) system models
for same reasone.
@katyukha
Copy link
Copy Markdown
Contributor Author

katyukha commented Mar 8, 2026

@cormaza @legalsylvain @yvaucher @zamberjo Please, review this fix.

Thanks a lot!

@legalsylvain
Copy link
Copy Markdown
Contributor

Hi. Could yiu explain the bug you want to solve ?

(With step to reproduce)

@zamberjo
Copy link
Copy Markdown
Member

zamberjo commented Mar 9, 2026

I agree with @legalsylvain . We have been using this functionality for a long time without needing these privilege escalations. We need steps to reproduce the issue and a test case to verify it.

@yvaucher
Copy link
Copy Markdown
Member

yvaucher commented Apr 1, 2026

Seems dubious to me to add some random sudo please provide some example of error you encounter.

Copy link
Copy Markdown
Contributor

@legalsylvain legalsylvain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants