43 lines
1.9 KiB
XML
43 lines
1.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<flectra>
|
|
<data noupdate="1">
|
|
|
|
<record id="rule_slide_channel_global" model="ir.rule">
|
|
<field name="name">Channel: restriction by group and visibility</field>
|
|
<field name="model_id" ref="model_slide_channel"/>
|
|
<field name="global" eval="True"/>
|
|
<field name="domain_force">[
|
|
'|',
|
|
('visibility', 'in', ['public', 'partial']),
|
|
'&',
|
|
('group_ids', 'in', [g.id for g in user.groups_id]),
|
|
('visibility', '=', 'private')]</field>
|
|
</record>
|
|
|
|
<record id="rule_slide_channel_public" model="ir.rule">
|
|
<field name="name">Channel: public: published only</field>
|
|
<field name="model_id" ref="model_slide_channel"/>
|
|
<field name="groups" eval="[(4, ref('base.group_public')) ,(4, ref('base.group_portal'))]"/>
|
|
<field name="domain_force">[('website_published', '=', True)]</field>
|
|
</record>
|
|
|
|
<record id="rule_slide_slide_global" model="ir.rule">
|
|
<field name="name">Slide: channel-related group restriction</field>
|
|
<field name="model_id" ref="model_slide_slide"/>
|
|
<field name="global" eval="True"/>
|
|
<field name="domain_force">[
|
|
'|',
|
|
('channel_id.visibility','in', ['public','partial']),
|
|
'&',
|
|
('channel_id.group_ids', 'in', [g.id for g in user.groups_id]),
|
|
('channel_id.visibility', '=', 'private')]</field>
|
|
</record>
|
|
|
|
<record id="rule_slide_slide_public" model="ir.rule">
|
|
<field name="name">Slide: public: published only</field>
|
|
<field name="model_id" ref="model_slide_slide"/>
|
|
<field name="groups" eval="[(4, ref('base.group_public')), (4, ref('base.group_portal'))]"/>
|
|
<field name="domain_force">[('channel_id.website_published', '=', True), ('website_published', '=', True)]</field>
|
|
</record>
|
|
</data>
|
|
</flectra> |