Skip to content

Commit

Permalink
[FAB-6668] Update AttributeRequest type definition
Browse files Browse the repository at this point in the history
FAB-6662 modified the fabric-ca API by changing
attr_req.require to attr_req.optional.

This change updates the type definition and
changes any use of require to optional.

Change-Id: I4e3ba32775bdb7dbdd860ae32a008258185b337b
Signed-off-by: Gari Singh <[email protected]>
  • Loading branch information
mastersingh24 committed Oct 18, 2017
1 parent 07a6323 commit 8a41d53
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fabric-ca-client/lib/FabricCAClientImpl.js
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ var FabricCAClient = class {
/**
* @typedef {Object} AttributeRequest
* @property {string} name - The name of the attribute to include in the certificate
* @property {boolean} required - throw an error if the identity does not have the attribute
* @property {boolean} optional - throw an error if the identity does not have the attribute
*/

/**
Expand Down
2 changes: 1 addition & 1 deletion test/integration/fabric-ca-services-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ test('\n\n ** FabricCAServices: Test enroll() With Dynamic CSR **\n\n', function
}).then((secret) => {
t.pass('Successfully registered "webAdmin" who can register other users with no role');

return caService.enroll({enrollmentID: 'webAdmin', enrollmentSecret: secret, attr_reqs :[{name:'myattrib', require : true}]});
return caService.enroll({enrollmentID: 'webAdmin', enrollmentSecret: secret, attr_reqs :[{name:'myattrib', optional : false}]});
},(err) => {
t.fail('Failed to register "webAdmin". ' + err.stack ? err.stack : err);
t.end();
Expand Down

0 comments on commit 8a41d53

Please sign in to comment.