Commit ede21fbe authored by root's avatar root
Browse files

Changes to accept reputation=0

parent ed1cec0a
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -80,6 +80,9 @@ public class GetAccessApiController implements GetAccessApi {
}*/ try{
dataSeekerID=body.getDataseekerID();
organizationAttributesAsString=policyService.getDataSeekersOrganizationPolicy(dataSeekerID);
// organizationAttributesAsString="{\"name\":\"Test Organization\",\"sector\":\"Test Sector\",\"continent\":\"EU\",\"country\":\"GRE\",\"type\":\"Private Entity\",\"size\":\"medium\",\"reputation\":7}";
System.out.println("organizationAttributesAsString:"+organizationAttributesAsString);
datasetIDList=new ArrayList<String>();
......@@ -121,6 +124,8 @@ public class GetAccessApiController implements GetAccessApi {
JSONObject accessPolicyAsJSON = null;
List<Access> listAccess =new ArrayList<Access>();
try{
organizationAttributesJson=new JSONObject(organizationAttributesAsString);
......@@ -130,6 +135,9 @@ public class GetAccessApiController implements GetAccessApi {
String accessPolicyasString=policyService.getDatasetPolicy(datasetID);
//String accessPolicyasString="{\"Continent\":[\"testContinent\",\"test2Continent\"],\"Type\":[\"testType\",\"test2Type\"],\"Sector\":[\"testSector\",\"test2Sector\"],\"Size\":[\"testSize\",\"test2Size\"],\"Country\":[\"testCountry\",\"test2Country\"],\"Reputation\":0}";
try
{
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -259,7 +259,7 @@ public class PolicyService {
}
catch(Exception e){
int iValue=accessPolicyAsJSON.getInt(parameterPolicy);
if (iValue==iOrgValue){
if ((iValue==0)||(iValue==iOrgValue)){
result=true;
// System.out.println("Is the same value?:"+result);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment