Browse Source

Merge pull request #1295 from acsone/10.0-keychain-cpi

[10.0] keychain: improve ACL and allow storing ssh keys as password
pull/1215/merge
beau sebastien 6 years ago
committed by GitHub
parent
commit
b150ce42d2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      keychain/models/keychain.py
  2. 3
      keychain/security/ir.model.access.csv

4
keychain/models/keychain.py

@ -48,12 +48,12 @@ class KeychainAccount(models.Model):
help="'prod', 'dev', etc. or empty (for all)" help="'prod', 'dev', etc. or empty (for all)"
) )
login = fields.Char(help="Login") login = fields.Char(help="Login")
clear_password = fields.Char(
clear_password = fields.Text(
help="Password. Leave empty if no changes", help="Password. Leave empty if no changes",
inverse='_inverse_set_password', inverse='_inverse_set_password',
compute='_compute_password', compute='_compute_password',
store=False) store=False)
password = fields.Char(
password = fields.Text(
help="Password is derived from clear_password", help="Password is derived from clear_password",
readonly=True) readonly=True)
data = fields.Text(help="Additionnal data as json") data = fields.Text(help="Additionnal data as json")

3
keychain/security/ir.model.access.csv

@ -1,2 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_keychain_account,access_keychain_account,model_keychain_account,,0,0,0,0
access_keychain_account,access_keychain_account,model_keychain_account,,1,0,0,0
access_keychain_account_admin,access_keychain_account_admin,model_keychain_account,base.group_system,1,1,1,1
Loading…
Cancel
Save