Skip to content

Commit d29fa22

Browse files
Merge pull request #886 from malshaniS/ccFix
Fix issue in consent mapping persistence step
2 parents bfba919 + 468447a commit d29fa22

File tree

1 file changed

+2
-2
lines changed
  • financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/impl

1 file changed

+2
-2
lines changed

financial-services-accelerator/components/org.wso2.financial.services.accelerator.consent.mgt.extensions/src/main/java/org/wso2/financial/services/accelerator/consent/mgt/extensions/authorize/impl/DefaultConsentPersistStep.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ private static Map<String, ArrayList<String>> getConsentedAccounts(JSONObject pe
266266
log.error(ConsentAuthorizeConstants.ACCOUNT_ID_NOT_FOUND_ERROR);
267267
throw new ConsentException(ResponseStatus.BAD_REQUEST,
268268
ConsentAuthorizeConstants.ACCOUNT_ID_NOT_FOUND_ERROR);
269-
} else {
270-
// in case a consent is denied with no account mappings
269+
} else if (!hasAuthorizedAccounts || !isApproved) {
270+
// in case a consent is denied or has no account mappings
271271
accountIDsMapWithPermissions.put("n/a", permissionsDefault);
272272
}
273273

0 commit comments

Comments
 (0)