Skip to content
CCPEDIAby Unity Nodes
App Development

Set both the primary party and the user rights?

2 posts55 viewsLast activity Aug 2024

  1. WallaceKellyOP

    Is there any reason to set both the primary party and the user rights to the same party?

    alice <- allocateParty "alice"
    
    aliceId1 <- validateUserId "Alice1"
    aliceId2 <- validateUserId "Alice2"
    aliceId3 <- validateUserId "Alice3"
    
    createUser (User aliceId1 (Some alice)) []
    createUser (User aliceId2 (Some alice)) [CanActAs alice]
    createUser (User aliceId3  None       ) [CanActAs alice]
    

    I would think that Alice1 is the preferred pattern. Is there any reason to use the other two?

    IOW, would there be any difference in result when submitting commands as aliceId1, aliceId2, or aliceId3?

  2. WallaceKelly

    Apparently, the user rights must be set, even if the primary party is set.