Files
odoo_source/addons/google_calendar/security/google_calendar_security.xml
T
Victor Feyens 680473748f [FIX] google_calendar: access to all tokens for the settings user.
Now that the settings user implies having internal user rights 
(base.group_user), the access rules for users are applied and the test 
test_system_user_should_be_able_to_reset_any_tokens failed.

This commit adds a generic ir rule giving all rights on gg calendar 
credentials to "Settings" users, aka base.group_system group.

Part-of: odoo/odoo#91909
2022-06-23 23:48:31 +02:00

31 lines
1.6 KiB
XML

<odoo>
<data noupdate="1">
<record id="google_calendar_not_own_token_rule" model="ir.rule">
<field name="name">Google Calendar NOT own token access rule</field>
<field name="model_id" ref="model_google_calendar_credentials"/>
<field name="domain_force">[('user_ids', 'not in', user.id)]</field>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="perm_create" eval="0"/>
<field name="perm_write" eval="0"/>
<field name="perm_unlink" eval="0"/>
<field name="perm_read" eval="1"/>
</record>
<record id="google_calendar_own_token_rule" model="ir.rule">
<field name="name">Google Calendar own token access rule</field>
<field name="model_id" ref="model_google_calendar_credentials"/>
<field name="domain_force">[('user_ids', 'in', user.id)]</field>
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
<field name="perm_create" eval="0"/>
<field name="perm_write" eval="1"/>
<field name="perm_unlink" eval="0"/>
<field name="perm_read" eval="1"/>
</record>
<record id="google_calendar_token_system_access" model="ir.rule">
<field name="name">Google Calendar manage all tokens</field>
<field name="model_id" ref="model_google_calendar_credentials"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4, ref('base.group_system'))]"/>
</record>
</data>
</odoo>