mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[7.0] [ADD] web_note and web_note_test (#216)
This commit is contained in:
committed by
Pedro M. Baeza
parent
09ee5fd70c
commit
e73038b836
3
web_note/security/ir.model.access.csv
Normal file
3
web_note/security/ir.model.access.csv
Normal file
@@ -0,0 +1,3 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_web_note,access.web.note,model_web_note,group_web_note_user,1,1,1,1
|
||||
access_web_note_container,access.web.note.container,model_web_note_container,group_web_note_user,1,1,1,1
|
||||
|
32
web_note/security/web_note_security.xml
Normal file
32
web_note/security/web_note_security.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="0">
|
||||
<!-- Web Note User Group -->
|
||||
<record model="res.groups" id="group_web_note_user">
|
||||
<field name="name">Web Note / User</field>
|
||||
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
||||
</record>
|
||||
<!-- Record Rules for Notes -->
|
||||
<record id="rule_web_note_private" model="ir.rule">
|
||||
<field name="name">Note Private</field>
|
||||
<field name="model_id" ref="web_note.model_web_note"/>
|
||||
<field name="groups" eval="[(4,ref('group_web_note_user'))]"/>
|
||||
<field name="domain_force">['|',('type', '!=', 'private'),'&' ,('type', '=', 'private'), ('create_uid', '=', user.id)]</field>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_unlink" eval="True"/>
|
||||
</record>
|
||||
<!-- Record Rules for Notes Containers -->
|
||||
<record id="rule_web_note_container_private" model="ir.rule">
|
||||
<field name="name">Note Container Private</field>
|
||||
<field name="model_id" ref="web_note.model_web_note_container"/>
|
||||
<field name="groups" eval="[(4,ref('group_web_note_user'))]"/>
|
||||
<field name="domain_force">['|',('type', '!=', 'private'),'&', ('type', '=', 'private'), ('create_uid', '=', user.id)]</field>
|
||||
<field name="perm_create" eval="True"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_unlink" eval="True"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
Reference in New Issue
Block a user