summaryrefslogtreecommitdiff
path: root/addons/website_event/security
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2013-08-06 15:20:41 +0200
committerChristophe Matthieu <chm@openerp.com>2013-08-06 15:20:41 +0200
commit972d35b277102aaabce3d8259c31867a52198656 (patch)
treee3c24862c6f3de012d08a90063ae706176aa6031 /addons/website_event/security
parentca54d94534089f3bf9f4b958d8564609c1ee9f49 (diff)
[IMP] website_event: access right for event and product
bzr revid: chm@openerp.com-20130806132041-84ubxx4hxgyqtwqk
Diffstat (limited to 'addons/website_event/security')
-rw-r--r--addons/website_event/security/ir.model.access.csv4
-rw-r--r--addons/website_event/security/website_event.xml20
2 files changed, 23 insertions, 1 deletions
diff --git a/addons/website_event/security/ir.model.access.csv b/addons/website_event/security/ir.model.access.csv
index 6bc81d1794d..430fced34b5 100644
--- a/addons/website_event/security/ir.model.access.csv
+++ b/addons/website_event/security/ir.model.access.csv
@@ -1,2 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_event_event_public,event.event.public,event.model_event_event,base.group_public,1,0,0,0 \ No newline at end of file
+access_event_event_public,event.event.public,event.model_event_event,base.group_public,1,0,0,0
+access_event_event_product_public,event.event.product.public,website_event.model_event_event_product,base.group_public,1,0,0,0
+access_event_product_product_public,event.product.product.public,product.model_product_product,base.group_public,1,0,0,0 \ No newline at end of file
diff --git a/addons/website_event/security/website_event.xml b/addons/website_event/security/website_event.xml
index 05014176217..6c571eb4875 100644
--- a/addons/website_event/security/website_event.xml
+++ b/addons/website_event/security/website_event.xml
@@ -11,5 +11,25 @@
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>
</record>
+ <record id="event_event_product_public" model="ir.rule">
+ <field name="name">event product: Public</field>
+ <field name="model_id" ref="website_event.model_event_event_product"/>
+ <field name="domain_force">[('event_id.website_published', '=', True)]</field>
+ <field name="groups" eval="[(4, ref('base.group_public'))]"/>
+ <field name="perm_read" eval="True"/>
+ <field name="perm_write" eval="False"/>
+ <field name="perm_create" eval="False"/>
+ <field name="perm_unlink" eval="False"/>
+ </record>
+ <record id="event_product_product_public" model="ir.rule">
+ <field name="name">Product linked to event: Public</field>
+ <field name="model_id" ref="product.model_product_product"/>
+ <field name="domain_force">[("event_type_id", "!=", False), ('event_product_ids.event_id.website_published', '=', True)]</field>
+ <field name="groups" eval="[(4, ref('base.group_public'))]"/>
+ <field name="perm_read" eval="True"/>
+ <field name="perm_write" eval="False"/>
+ <field name="perm_create" eval="False"/>
+ <field name="perm_unlink" eval="False"/>
+ </record>
</data>
</openerp>