readAs delegation
- cohen.avrahamOP
Subject: Clarification on
readAsAcross Participants and the Role of Party ReplicationHi Canton Team,
I would appreciate some clarification regarding
readAsauthorization across participants.Consider the following template:
template Data with creator: Party public : Party data : Text where signatory creator observer publicAnd I want to allow users to view this contract.
So, let’s say I have
userAparty that I would like to allow him to view this Data contract.Normally, I will grant
readAspermission touserAaspublic.My problem with this approach is that it does not work for parties hosted on different participants.
So, is party replication the right solution for it?
If so, what are the implications for this action that I need to consider?
- Jatin_Pandya_cf
hey @cohen.avraham
readAsgrants are local to a participant so IfuserAis on Participant B and theDatacontract is on Participant A, grantinguserAreadAspublicon Participant B does nothing so Participant B doesn’t receive the contract becausepublicisn’t hosted there as a stakeholder.Canton’s privacy model means a participant only receives contracts where at least one of its hosted parties is a stakeholder as signatory or observer on that contract.
but on que if party replication the right solution? I’d say it’s one valid solution but in this u essentially host
publicon both Participant A (where contracts are created) and Participant B (whereuserAlives) with Participant B then receives allDatacontracts wherepublicis observer anduserAcan readAspublicon Participant B and see themAnother thing I was thinking is If selective per contract visibility is needed, use a separate disclosure observer party per user rather than a shared
publicparty. Each user gets their own observer party hosted only on their participant, and the creator explicitly adds them as observer on contracts they should see. More surgical, but more management overhead.