Skip to content

Commit

Permalink
fix(backend): fixed policy action type
Browse files Browse the repository at this point in the history
  • Loading branch information
saudkhan116 committed Jul 17, 2024
1 parent 4edcac3 commit 8025103
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ configuration:
# List of allowed permissions policies
policies:
- permission:
- action: "USE"
- action: "odrl:use"
logicalConstraint: "odrl:and"
constraints:
- leftOperand: "cx-policy:Membership"
Expand Down Expand Up @@ -156,7 +156,7 @@ configuration:
strictMode: false
policies:
- permission:
- action: "USE"
- action: "odrl:use"
logicalConstraint: "odrl:and"
constraints:
- leftOperand: "cx-policy:Membership"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ void saveTransferRequestAndTransfer() {
transferRequest.setProtocol("HTTP");
transferRequest.setContractId(contractId);
transferRequest.setAssetId(assetId);
transferRequest.setConnectorAddress("connectorAddress");
transferRequest.setCounterPartyAddress("connectorAddress");

String transferId = UUID.randomUUID().toString();
Transfer transfer = new Transfer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ void setUp() {

correctLogicalConstraint.put("odrl:and", correctContraints);

action.put("odrl:action", new LinkedHashMap<>(){{put("odrl:type","USE");}});
action.put("odrl:action", new LinkedHashMap<>(){{put("@id","odrl:use");}});
action.put("odrl:constraint", logicalConstraint);

correctAction.put("odrl:action", new LinkedHashMap<>(){{put("odrl:type","USE");}});
correctAction.put("odrl:action", new LinkedHashMap<>(){{put("@id","odrl:use");}});
correctAction.put("odrl:constraint", correctLogicalConstraint);

actionDtr.put("odrl:action", new LinkedHashMap<>(){{put("odrl:type","USE");}});
actionDtr.put("odrl:action", new LinkedHashMap<>(){{put("@id","odrl:use");}});
actionDtr.put("odrl:constraint", logicalConstraintDtr);

singlePermission = correctAction;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ configuration:
# List of allowed permissions policies
policies:
- permission:
- action: "USE"
- action: "odrl:use"
logicalConstraint: "odrl:and"
constraints:
- leftOperand: "cx-policy:Membership"
Expand Down Expand Up @@ -174,7 +174,7 @@ configuration:
strictMode: false # The strict mode is quicker and requires less computation complexity, the default mode is comparing against every single object value
policies:
- permission:
- action: "USE"
- action: "odrl:use"
logicalConstraint: "odrl:and"
constraints:
- leftOperand: "cx-policy:Membership"
Expand Down

0 comments on commit 8025103

Please sign in to comment.