What I want to do is that give READ ACCESS to a particular participant the fields of other participants but putting condition on third resource.
Eg:
rule SampleRule{
description: "Allow the Participant1 to view Participant2 profile"
participant(m): "org.sample.blockchain.Participant1"
operation: READ
resource(v): "org.sample.blockchain.Participant2"
condition:(
v.getIdentifier() == Record.Participant1.getIdentifier()
&& m.getIdentifier() == Record.Participant2.getIdentifier()
)
action: ALLOW
}
asset Record identified by Id {
o String Id
--> Participant1 Participant1
--> Participant2 Participant2
}
participant Participant1 identified by EmailId{
o String EmailId
o String Name
o Integer Age
}
participant Participant2 identified by EmailId{
o String EmailId
o String Name
o Integer Age
}
So here I want to give access of profile of participant2 to participant1 based on some asset record.
Is it possible to this thing in composer and if not what are the other options?