[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:
Romain Derie
2018-09-25 15:15:57 +02:00
parent 30302bc116
commit bcd405efa3
+1 -1
View File
@@ -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')