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.

43 lines
2.2 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!--
  3. Copyright 2016-2017 LasLabs Inc.
  4. License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
  5. -->
  6. <odoo>
  7. <record id="view_users_form" model="ir.ui.view">
  8. <field name="name">User Form - MFA Settings</field>
  9. <field name="model">res.users</field>
  10. <field name="inherit_id" ref="base.view_users_form"/>
  11. <field name="arch" type="xml">
  12. <xpath expr="//group[@name='messaging']" position="after">
  13. <group string="MFA Settings" name="mfa_settings" col="8">
  14. <p colspan="8">Note: Please have user add at least one authentication app/device before enabling MFA.</p>
  15. <label for="mfa_enabled" colspan="3"/>
  16. <field name="mfa_enabled" colspan="5" nolabel="1"/>
  17. <label for="authenticator_ids" colspan="3"/>
  18. <field name="authenticator_ids" widget="many2many_tags" options="{'no_create': True}" domain="[('user_id', '=', id)]" colspan="5" nolabel="1"/>
  19. </group>
  20. </xpath>
  21. </field>
  22. </record>
  23. <record id="view_users_form_simple_modif" model="ir.ui.view">
  24. <field name="name">Change My Preferences - MFA Settings</field>
  25. <field name="model">res.users</field>
  26. <field name="inherit_id" ref="base.view_users_form_simple_modif"/>
  27. <field name="arch" type="xml">
  28. <xpath expr="//footer" position="before">
  29. <group string="MFA Settings" name="mfa_settings" col="8">
  30. <p colspan="8">Note: Please add at least one authentication app/device before enabling MFA.</p>
  31. <label for="mfa_enabled" colspan="3"/>
  32. <field name="mfa_enabled" readonly="0" colspan="5" nolabel="1"/>
  33. <label for="authenticator_ids" colspan="3"/>
  34. <field name="authenticator_ids" widget="many2many_tags" options="{'no_create': True}" colspan="4" readonly="0" nolabel="1"/>
  35. <button string="Add New App/Device" type="action" name="%(res_users_authenticator_create_action)d" colspan="1"/>
  36. </group>
  37. </xpath>
  38. </field>
  39. </record>
  40. </odoo>