Is multiple parties per DAML/hub user possible?

We have a few questions about the user workflows as described on https://projectdabl.com/docs/api/iam/#listening-for-new-users.

Our plan was that a user logs in, and then chooses which party (or sort of party / role) they want to be. E.g. they log in and say what their job is. The important part is that every (user, role) pair should have their own DAML party — multiple parties per user.

However the docs at https://projectdabl.com/docs/api/iam/ seem to imply that a user logging in from DAML/hub gets one party. Is what we want to do possible?

1 Like

Is there something specific you’re looking to get out of the separation of users into individual Party's by role? I’d liken that to needing a separate login for mini-apps within the same platform, and that could greatly limit the user’s flexibility in reasoning about models across roles that they otherwise have access to.

It is possible to have multiple parties associated with the same user; you can create additional parties through the Add Party on the console. It’s unfortunately not that well-integrated into the login process, though, so users would have to acquire JWTs for specific parties by logging into the Daml Hub console and “picking” a party there.

A good use case for a single user having multiple parties is one where a user wishes to place a rigid boundary. Using DABL Chat as an example, a user might choose to create multiple “accounts” for the same reason someone might want more than one Twitter handle; but the parties are not created solely for rights segmentation purposes.

1 Like

Thanks @dtanabe. I plaid around with the chat app on DAML/hub and saw the things you are referring to.

2 Likes

@Ericson2314 if you happen to be doing this in order to implement role-based access control, you may want to take a look at use case 2 in Roles in Daml - Introducing Multi-party submissions - Daml

1 Like