diff --git a/vault/__manifest__.py b/vault/__manifest__.py index 79d7c576ab..dcd66a5753 100644 --- a/vault/__manifest__.py +++ b/vault/__manifest__.py @@ -14,6 +14,7 @@ "data": [ "security/ir.model.access.csv", "security/ir_rule.xml", + "security/vault_security.xml", "views/res_config_settings_views.xml", "views/res_users_views.xml", "views/vault_entry_views.xml", diff --git a/vault/models/res_config_settings.py b/vault/models/res_config_settings.py index 00923c6c42..105571263f 100644 --- a/vault/models/res_config_settings.py +++ b/vault/models/res_config_settings.py @@ -8,3 +8,9 @@ class ResConfigSettings(models.TransientModel): _inherit = "res.config.settings" module_vault_share = fields.Boolean() + group_vault_export = fields.Boolean( + "Export Vaults", implied_group="vault.group_vault_export" + ) + group_vault_import = fields.Boolean( + "Import Vaults", implied_group="vault.group_vault_import" + ) diff --git a/vault/security/vault_security.xml b/vault/security/vault_security.xml new file mode 100644 index 0000000000..9cbff91104 --- /dev/null +++ b/vault/security/vault_security.xml @@ -0,0 +1,13 @@ + + + + Allow export vaults + + + + + Allow import vaults + + + + diff --git a/vault/views/vault_entry_views.xml b/vault/views/vault_entry_views.xml index a5b444a79f..738f520252 100644 --- a/vault/views/vault_entry_views.xml +++ b/vault/views/vault_entry_views.xml @@ -32,11 +32,13 @@ type="object" name="action_open_import_wizard" string="Import from file" + groups="vault.group_vault_import" />