Browse Source

Add read rights on asterisk.server for group "Asterisk CallerID"

Patch courtesy of Marcel van der Boom (HS-Development BV)
Convert ACLs from XML format to CSV format.
pull/7/head
Alexis de Lattre 12 years ago
parent
commit
48205f7b70
  1. 1
      asterisk_click2dial/__openerp__.py
  2. 34
      asterisk_click2dial/security/asterisk_server_security.xml
  3. 5
      asterisk_click2dial/security/ir.model.access.csv

1
asterisk_click2dial/__openerp__.py

@ -58,6 +58,7 @@ A detailed documentation for this module is available on the Akretion Web site :
'wizard/open_calling_partner_view.xml', 'wizard/open_calling_partner_view.xml',
'wizard/reformat_all_phonenumbers_view.xml', 'wizard/reformat_all_phonenumbers_view.xml',
'security/asterisk_server_security.xml', 'security/asterisk_server_security.xml',
'security/ir.model.access.csv',
], ],
'demo': ['asterisk_click2dial_demo.xml'], 'demo': ['asterisk_click2dial_demo.xml'],
'images': [ 'images': [

34
asterisk_click2dial/security/asterisk_server_security.xml

@ -1,49 +1,17 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
Asterisk Click2dial module for OpenERP Asterisk Click2dial module for OpenERP
Copyright (C) 2010-2012 Alexis de Lattre <alexis@via.ecp.fr>
Copyright (C) 2010-2013 Alexis de Lattre <alexis@via.ecp.fr>
The licence is in the file __openerp__.py The licence is in the file __openerp__.py
--> -->
<openerp> <openerp>
<data noupdate="1"> <data noupdate="1">
<!-- Default access rules for the new asterisk.server object -->
<record id="ir_model_access_asterisk_server_user" model="ir.model.access">
<field name="model_id" ref="asterisk_click2dial.model_asterisk_server"/>
<field name="name" eval="&quot;&quot;&quot;asterisk.server_user&quot;&quot;&quot;" />
<field name="group_id" ref="base.group_user"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="0"/>
<field name="perm_unlink" eval="0"/>
<field name="perm_create" eval="0"/>
</record>
<record id="ir_model_access_asterisk_server_system" model="ir.model.access">
<field name="model_id" ref="asterisk_click2dial.model_asterisk_server"/>
<field name="name" eval="&quot;&quot;&quot;asterisk.server_system&quot;&quot;&quot;"/>
<field name="group_id" ref="base.group_system"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_unlink" eval="1"/>
<field name="perm_create" eval="1"/>
</record>
<!-- New group dedicated to the "Get CallerID name from OpenERP" feature --> <!-- New group dedicated to the "Get CallerID name from OpenERP" feature -->
<record id="group_asterisk_cid" model="res.groups"> <record id="group_asterisk_cid" model="res.groups">
<field name="name">Asterisk CallerID</field> <field name="name">Asterisk CallerID</field>
</record> </record>
<!-- Only add the minimum rights to the "Asterisk CallerID" group -->
<record id="ir_model_access_asterisk_cid" model="ir.model.access">
<field name="model_id" ref="base.model_res_partner"/>
<field name="name" eval="&quot;&quot;&quot;res.partner_read&quot;&quot;&quot;"/>
<field name="group_id" ref="asterisk_click2dial.group_asterisk_cid"/>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="0"/>
<field name="perm_unlink" eval="0"/>
<field name="perm_create" eval="0"/>
</record>
</data> </data>
</openerp> </openerp>

5
asterisk_click2dial/security/ir.model.access.csv

@ -0,0 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
ir_model_access_asterisk_server_user,Read access on asterisk.server,model_asterisk_server,base.group_user,1,0,0,0
ir_model_access_asterisk_server_system,Full rights on asterisk.server,model_asterisk_server,base.group_system,1,1,1,1
asterisk_cid_res_partner_read,Read access on res.partner,base.model_res_partner,group_asterisk_cid,1,0,0,0
asterisk_cid_asterisk_server_read,Read access on asterisk.server,model_asterisk_server,group_asterisk_cid,1,0,0,0
Loading…
Cancel
Save