From c53876c43bc3113280b9240df17c2f34f81379ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kalvis=20Kalni=C5=86=C5=A1?= Date: Mon, 9 Dec 2019 11:30:20 +0200 Subject: [PATCH] fix: set/get Signer.required (templates only) --- lib/Signer.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/Signer.js b/lib/Signer.js index cf45710..e1cb90d 100755 --- a/lib/Signer.js +++ b/lib/Signer.js @@ -36,6 +36,12 @@ function Signer(newSigner = {}) { */ role: undefined, + /** + * Returns 1 if this signing role is required (Templates only). + * @type {Boolean} + */ + required: false, + /** * Pins are used as an extra level of security and must be put in * by the signer before signing the Document. @@ -189,6 +195,10 @@ function Signer(newSigner = {}) { return signer.role; }; + this.getRequired = function () { + return signer.required; + }; + this.setName = function (newName) { signer.name = newName; }; @@ -201,6 +211,10 @@ function Signer(newSigner = {}) { signer.role = newRole; } + this.setRequired = function (newRequired) { + signer.required = newRequired; + } + this.toObject = function () { return Object.assign(this, signer); };