-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[17.0][REF] auditlog: fetch field data as user #3115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 17.0
Are you sure you want to change the base?
Conversation
Currently auditlog fetch field data as sudo It doesn't make sense to use sudo to fetch the data since the user only have access to edit fields that he has access too. By using sudo we bypass multi company rules This commit will fix OCA#2554
47e17f3
to
c60e829
Compare
@NL66278 @andreschenkels Can you guys make a functional test on it, as far as I see it works as expected and didn't broke any functionality |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR has the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gbrito on a multi companie environment this still procues an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a reproducing test? There is already a multicompany test in test_multi_company.py that you can tag along to.
Also, please mention the module name in the commit message, and rebase to fix the trivial conflict.
@gbrito The PR is actually for 17.0, not for 18.0 Please update the description. Also needs rebase. |
@NL66278 description was my bad, fixed now. |
Currently auditlog fetch field data as sudo
It doesn't make sense to use sudo to fetch the data since the user only have access to edit fields that he has access too. By using sudo we bypass multi company rules
This commit will fix #2554