I am creating an asset in Hyperledger composer as shown below. I want to add participants in Bank[] array (these banks will only have read only access). In Permission.acl file how can I write condition for checking into the array(Bank[]) if the participant exist for this asset(Read only).
ASSET DEFINITION:
asset Details identified by detailsId {
o String detailsId
o String description optional
--> Bank owner
--> Bank[] access optional
o String document
}
This rule should do the trick, though your namespace is likely different. Assumes that you have other rules in place to allow access to the Bank participant registry.
something like below - a) if its not empty and b) if the participant from the bank is authorised (by checking the array) - if so, allow READ access (if I read you correctly).
or a condition (something like below) if case is an issue: