[FIX] website_slides: fix website_meta_og_img right on partial channel
156955de6b introduced a new property `website_meta_og_img` in
`website.seo.metadata`.
When rendering a template, `render()` is calling `get_website_meta` that will
end up reading `website.seo.metadata` fields.
But `website_slides` module is overriding `check_field_access_rights` to allow
partial read on the record.
The new `website_meta_og_img` was missing from the allowed fields, thus
crashing when an user without the required slide's group would try to read the
slide.
This commit is contained in:
@@ -270,7 +270,7 @@ class Slide(models.Model):
|
||||
_PROMOTIONAL_FIELDS = [
|
||||
'__last_update', 'name', 'image_thumb', 'image_medium', 'slide_type', 'total_views', 'category_id',
|
||||
'channel_id', 'description', 'tag_ids', 'write_date', 'create_date',
|
||||
'website_published', 'website_url', 'website_meta_title', 'website_meta_description', 'website_meta_keywords']
|
||||
'website_published', 'website_url', 'website_meta_title', 'website_meta_description', 'website_meta_keywords', 'website_meta_og_img']
|
||||
|
||||
_sql_constraints = [
|
||||
('name_uniq', 'UNIQUE(channel_id, name)', 'The slide name must be unique within a channel')
|
||||
|
||||
Reference in New Issue
Block a user