Skip to content

Commit

Permalink
fix: set/get Signer.required (templates only)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuukis committed Dec 9, 2019
1 parent a21f5ee commit c53876c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/Signer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -189,6 +195,10 @@ function Signer(newSigner = {}) {
return signer.role;
};

this.getRequired = function () {
return signer.required;
};

this.setName = function (newName) {
signer.name = newName;
};
Expand All @@ -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);
};
Expand Down

0 comments on commit c53876c

Please sign in to comment.