Skip to content
Snippets Groups Projects
Commit 307f51ab authored by David Beguin's avatar David Beguin
Browse files

[IMP] web: split _content_image with get response sub method

This commit splits the _content_image method to allow to call the
get response part individually.

This is needed because _content_image call binary_content using current user
access. But in some cases, we need to render a binary content even if the user
does not have access to the target model (typically for public users).

The binary_content is gotten in sudo mode where needed and the result can be
given to the _content_image_get_response.

This will avoid code duplication where the sudo use case is met.

Usage :
This commit prepare the redesign of survey. This _content_image_get_response
method will be called to grant access of background image even for public
users. Other modules will use this new method like elearning (website_slides)
to display karma ranking, etc.

Task ID: '2150291'
PR #43237
parent ded9d609
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment