google_calendar_security.xml 1.6 KB

12345678910111213141516171819202122232425262728293031
  1. <odoo>
  2. <data noupdate="1">
  3. <record id="google_calendar_not_own_token_rule" model="ir.rule">
  4. <field name="name">Google Calendar NOT own token access rule</field>
  5. <field name="model_id" ref="model_google_calendar_credentials"/>
  6. <field name="domain_force">[('user_ids', 'not in', user.id)]</field>
  7. <field name="groups" eval="[(4, ref('base.group_user'))]"/>
  8. <field name="perm_create" eval="0"/>
  9. <field name="perm_write" eval="0"/>
  10. <field name="perm_unlink" eval="0"/>
  11. <field name="perm_read" eval="1"/>
  12. </record>
  13. <record id="google_calendar_own_token_rule" model="ir.rule">
  14. <field name="name">Google Calendar own token access rule</field>
  15. <field name="model_id" ref="model_google_calendar_credentials"/>
  16. <field name="domain_force">[('user_ids', 'in', user.id)]</field>
  17. <field name="groups" eval="[(4, ref('base.group_user'))]"/>
  18. <field name="perm_create" eval="0"/>
  19. <field name="perm_write" eval="1"/>
  20. <field name="perm_unlink" eval="0"/>
  21. <field name="perm_read" eval="1"/>
  22. </record>
  23. <record id="google_calendar_token_system_access" model="ir.rule">
  24. <field name="name">Google Calendar manage all tokens</field>
  25. <field name="model_id" ref="model_google_calendar_credentials"/>
  26. <field name="domain_force">[(1,'=',1)]</field>
  27. <field name="groups" eval="[(4, ref('base.group_system'))]"/>
  28. </record>
  29. </data>
  30. </odoo>