-
Notifications
You must be signed in to change notification settings - Fork 370
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
[INDY-1148] It's possible to create several nodes with the same alias #554
[INDY-1148] It's possible to create several nodes with the same alias #554
Conversation
Can one of the admins verify this patch? |
Could one of the committers please verify this patch? |
Test this please |
plenum/server/pool_req_handler.py
Outdated
curNodeData = self.stateSerializer.deserialize(curNodeData) | ||
if nodeAlias == curNodeData.get( | ||
ALIAS) and nodeNym.encode() != curNodeNym: | ||
return "Alias " + curNodeData.get(ALIAS) + " already exists" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic should be put into PoolRequestHandler.isNodeDataConflicting
method.
60e397c
to
42e62d2
Compare
Test this please |
plenum/server/pool_req_handler.py
Outdated
@@ -80,7 +80,8 @@ def authErrorWhileAddingNode(self, request): | |||
origin) | |||
if self.stewardHasNode(origin): | |||
return "{} already has a node".format(origin) | |||
if self.isNodeDataConflicting(operation.get(DATA, {})): | |||
if self.isNodeDataConflicting( | |||
operation.get(DATA, request.operation.get(TARGET_NYM))): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for this change?
… - add dynamic validation of alias and test Signed-off-by: toktar <[email protected]>
… - put alias validation into PoolRequestHandler.isNodeDataConflicting Signed-off-by: toktar <[email protected]>
… - change validation in pool_req_handler. Signed-off-by: toktar <[email protected]>
dcdf496
to
366ca07
Compare
test this please |
…hyperledger#554) add dynamic validation of alias and test Signed-off-by: toktar <[email protected]> put alias validation into PoolRequestHandler.isNodeDataConflicting Signed-off-by: toktar <[email protected]> change validation in pool_req_handler. Signed-off-by: toktar <[email protected]>
…hyperledger#554) add dynamic validation of alias and test Signed-off-by: toktar <[email protected]> put alias validation into PoolRequestHandler.isNodeDataConflicting Signed-off-by: toktar <[email protected]> change validation in pool_req_handler. Signed-off-by: toktar <[email protected]>
add dynamic validation of alias and test
Signed-off-by: toktar [email protected]