New user onboarding on project:DABL

Hi,

On this page there is a suggestion to create a new
UserAccountRequest contract when a new user logs on.

https://docs.projectdabl.com/api/iam/#listening-for-new-users

The operator would then accept this request and create a new user role etc.

Question: How do I get the operator party which is required to create this new contract. I am using the daml-ui-template indicated on github.com/digital-asset.

Specific directions would be sincerely appreciated.

Many thanks!

2 Likes

Hi @ManishGrover.

Typically, a user would receive the party that the bot is running as, via an environment variable, and then scan for, and conditionally create, an operator contract, if it was found that one did not yet exist.

These steps are exemplified in DablChat, for instance here:

  1. dablchat/operator_bot.py at f6d1770eb5006af9015f1a43adaa2ed7983ff319 · digital-asset/dablchat · GitHub
  2. dablchat/operator_bot.py at f6d1770eb5006af9015f1a43adaa2ed7983ff319 · digital-asset/dablchat · GitHub
  3. dablchat/operator_bot.py at f6d1770eb5006af9015f1a43adaa2ed7983ff319 · digital-asset/dablchat · GitHub

I’d be interested to see how we might go about describing the functionality in a more useful way!

1 Like

Everything @Max_DeLiso said is spot on, but I would also add on that the convention is to use UserAdmin as the operator party for applications deployed on project:DABL.

The advantage to this is that we expose a JSON document that reports the party identifier for the UserAdmin party, so that it is discoverable by the frontend. See here for more info on that endpoint

2 Likes