summaryrefslogtreecommitdiff
path: root/addons/note/security
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2012-09-13 19:19:38 +0200
committerChristophe Matthieu <chm@openerp.com>2012-09-13 19:19:38 +0200
commit576d664f883bce3744903b081a9e25f4d35644ce (patch)
treeb2cd2971acc8a123b2d3d3e2409e98f254e46f8e /addons/note/security
parent9ab1f35de57682686c3bf8e959bfb77f7a2b225f (diff)
[IMP] note: stage by user, group by stage, access rules
bzr revid: chm@openerp.com-20120913171938-0zmtm2ds5mjdgttj
Diffstat (limited to 'addons/note/security')
-rw-r--r--addons/note/security/ir.model.access.csv5
-rw-r--r--addons/note/security/ir.rule.xml12
-rw-r--r--addons/note/security/note_security.xml12
3 files changed, 15 insertions, 14 deletions
diff --git a/addons/note/security/ir.model.access.csv b/addons/note/security/ir.model.access.csv
index fe523cdd2ee..6c5ea823d96 100644
--- a/addons/note/security/ir.model.access.csv
+++ b/addons/note/security/ir.model.access.csv
@@ -1,3 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_note_stage_user,note.stage,model_note_stage,base.group_user,1,1,1,1
-access_note_note_user,note.note,model_note_note,base.group_user,1,1,1,1
+access_note_stage,note.stage,model_note_stage,,1,1,1,1
+access_note_note,note.note,model_note_note,,1,1,1,1
+access_note_tag,note.tag,model_note_tag,,1,1,1,1
diff --git a/addons/note/security/ir.rule.xml b/addons/note/security/ir.rule.xml
new file mode 100644
index 00000000000..4eab169519f
--- /dev/null
+++ b/addons/note/security/ir.rule.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<openerp>
+<data>
+ <record id="note_note_rule_global" model="ir.rule">
+ <field name="name">Only followers can read a memos</field>
+ <field model="ir.model" ref="model_note_note" name="model_id"/>
+ <field name="domain_force">['|',('message_follower_ids.id','=',user.partner_id.id),('message_follower_ids','=',False)]</field>
+ <field eval="True" name="global"/>
+ </record>
+</data>
+</openerp>
+
diff --git a/addons/note/security/note_security.xml b/addons/note/security/note_security.xml
deleted file mode 100644
index 3710d79839e..00000000000
--- a/addons/note/security/note_security.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0"?>
-<openerp>
-<data>
- <record id="note_note_global" model="ir.rule">
- <field name="name">My notes</field>
- <field ref="model_note_note" name="model_id"/>
- <field eval="1" name="global"/>
- <field name="domain_force">[('message_follower_ids','=',user.partner_id.id)]</field>
- </record>
-</data>
-</openerp>
-