Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow default affiliation in Register #14

Open
vdods opened this issue Oct 31, 2018 · 0 comments
Open

Allow default affiliation in Register #14

vdods opened this issue Oct 31, 2018 · 0 comments

Comments

@vdods
Copy link

vdods commented Oct 31, 2018

The Fabric-CA docs https://hyperledger-fabric-ca.readthedocs.io/en/latest/users-guide.html#registering-a-new-identity say If no affiliation is specified in the registration request, the identity being registered will be given the affiliation of the registrar. but there is a check in caclient.go Register for if the affiliation is set in the request. I've made the following change in my fork to allow this.

--------------------------------- caclient.go ---------------------------------
index f572651..8ea697c 100644
@@ -417,9 +417,9 @@ func (f *FabricCAClient) Register(identity *Identity, req *CARegistrationRequest
if req.EnrolmentId == "" {
return "", ErrEnrolmentMissing
}

  • if req.Affiliation == "" {
  •   return "", ErrAffiliationMissing
    
  • }
    +// if req.Affiliation == "" {
    +// return "", ErrAffiliationMissing
    +// }
    if req.Type == "" {
    return "", ErrTypeMissing
    }

I'm happy to make a PR for this if it makes things easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant