You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.8 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="module_category_git" model="ir.module.category">
  4. <field name="name">Git</field>
  5. </record>
  6. <record id="group_collaborator" model="res.groups">
  7. <field name="name">Collaborator</field>
  8. <field name="category_id" ref="module_category_git" />
  9. </record>
  10. <record id="group_admin" model="res.groups">
  11. <field name="name">Administrator</field>
  12. <field name="category_id" ref="module_category_git" />
  13. <field name="implied_ids" eval="[(4,ref('group_collaborator'))]" />
  14. </record>
  15. <record id="base.group_erp_manager" model="res.groups">
  16. <field name="implied_ids" eval="[(4,ref('group_admin'))]" />
  17. </record>
  18. <record id="repository_collaborator_access_rule" model="ir.rule">
  19. <field name="name">Collaborators can only access repositories they are assigned to</field>
  20. <field name="model_id" ref="model_galicea_git_repository" />
  21. <field name="groups" eval="[(4, ref('group_collaborator'))]"/>
  22. <field name="domain_force">
  23. [('collaborator_ids', 'in', user.id)]
  24. </field>
  25. <field eval="1" name="perm_read" />
  26. <field eval="0" name="perm_write" />
  27. <field eval="0" name="perm_create" />
  28. <field eval="0" name="perm_unlink" />
  29. </record>
  30. <record id="repository_admin_access_rule" model="ir.rule">
  31. <field name="name">Administrators can access any repositories</field>
  32. <field name="model_id" ref="model_galicea_git_repository" />
  33. <field name="groups" eval="[(4, ref('group_admin'))]"/>
  34. <field name="domain_force">
  35. [(1, '=', 1)]
  36. </field>
  37. <field eval="1" name="perm_read" />
  38. <field eval="0" name="perm_write" />
  39. <field eval="0" name="perm_create" />
  40. <field eval="0" name="perm_unlink" />
  41. </record>
  42. </odoo>