Hi Danesh, Thanks for the prompt action.
Regards, Megala On Thu, Nov 23, 2017 at 8:54 AM, Danesh Kuruppu <[email protected]> wrote: > Hi Megala, > > +1. Thanks for the fix. reviewed and merged the PR. > > Thanks > Danesh > > On Wed, Nov 22, 2017 at 11:11 PM, Megala Uthayakumar <[email protected]> > wrote: > >> Hi All, >> >> I am working on adding access control support to APIM 2.1.x,. For this >> feature, we are making use of the registry property-search for the getting >> relevant resources based on user roles. While doing the implementation, I >> came across following behaviour, >> >> Even though if we add multiple versions of an API, only one version of >> that particular API is visibile in the publisher. While analyzing this >> issue, I understood this issue is only happening if we are using >> PaginationContext init, with the sort property "overview_name" (i.e. API >> Name). This has happened because when finally sorting the merged attribute >> search result and property search result, we are using the TreeSet in [1] >> and in TreeSet if comparator [2] returns 0, it will be thought as duplicate >> and that value will be replaced TreeSet. Since in API Manager case, both >> the versions of API will have the same "overview_name" and the comparator >> will return the value as 0, so only one value will be given as result. In >> order to overcome this, we need to return some other value, whenever the >> comparison value is 0. >> >> I have created an github issue for this [3] and did a fix for this issue[ >> 4]. I tested this fix locally and it seems to be working fine. >> >> Appreciate if someone from registry team can review and merge this. >> >> [1] https://github.com/wso2/carbon-governance/blob/master/co >> mponents/governance/org.wso2.carbon.governance.api/src/ >> main/java/org/wso2/carbon/governance/api/util/GovernanceUtils.java#L2055 >> [2] https://github.com/wso2/carbon-governance/blob/master/co >> mponents/governance/org.wso2.carbon.governance.api/src/ >> main/java/org/wso2/carbon/governance/api/util/GovernanceUtils.java#L2056 >> [3] https://github.com/wso2/carbon-governance/issues/297 >> [4] https://github.com/wso2/carbon-governance/pull/298 >> >> Thanks. >> >> Regards, >> Megala >> -- >> Megala Uthayakumar >> >> Software Engineer >> Mobile : 0779967122 >> > > > > -- > > *Danesh Kuruppu* > Senior Software Engineer | WSO2 > > Email: [email protected] > Mobile: +94 (77) 1690552 <+94%2077%20169%200552> > Web: WSO2 Inc <https://wso2.com/signature> > > -- Megala Uthayakumar Software Engineer Mobile : 0779967122
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
