Skip to content

Commit

Permalink
Merge PR #679 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Aug 20, 2024
2 parents 98a33a3 + 9feb331 commit 6cd8435
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions vault_share/static/src/backend/fields/vault_field.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,22 @@ import vault from "vault";

// Extend the widget to share
patch(VaultField.prototype, "vault_share", {
get shareButton() {
return this.props.value;
},
/**
* Share the value for an external user
*
* @private
*/
async _onShareValue() {
async _onShareValue(ev) {
ev.stopPropagation();
const iv = await utils.generate_iv_base64();
const pin = sh_utils.generate_pin(sh_utils.PinSize);
const salt = utils.generate_bytes(utils.SaltLength).buffer;
const key = await utils.derive_key(pin, salt, utils.Derive.iterations);
const public_key = await vault.get_public_key();
const value = await this._decrypt(this.value);
const value = await this._decrypt(this.props.value);

this.action.doAction({
type: "ir.actions.act_window",
Expand Down

0 comments on commit 6cd8435

Please sign in to comment.