creating TenantManager in multi-tenant module

0
Can anyone explain how to create a 'TenantManager' in the multi-tenant module? This is a role defined in the module but it's perplexing how to use the role in creating users. There's a 'Model GUID' whose purpose isn't clear. The goal is to assign the 'TenantManager' role to users scoped to a tenant who can administer that tenant's users. Below is the creation of the 'TenantManager' role, notice the 'Model GUID' doesn't get set (which could be related to the problem, any idea what this is for?)   Then attempting to assign the 'TenantManager' role to a TenantUser fails, probably because the new role isn't properly defined?
asked
2 answers
0

Hi GK,

The easiest way to accomplish this is to add the user role in the modeler and grant it the tenant manager module role from from the multi-tenant module.

In the project module, go to securitey > user roles > new. Name the new role TenantManager and deselect the option to add a new module role to all modules.

 

Then once its created select it and click edit and then click edit next to module roles. Then select the check box for tenant manager and redeploy your app.

 

Now when you go to your edit Tenant User page, if you click the arrow next to the user role field, you should get a pop up of all the available user roles, one being the tenantManger user role you just created.

 

 

To use the screen you were using before, you need to add the microflow "ASU_UserRoles" to a custom after start up microflow. The after start up microflow can be set in the project module > settings > runtime tab > after start up.

 

You can create a microflow that calls "ASU_UserRoles". Then once you add a user role manually in your app (from your screen shot), the next time the environment is restarted the user role will be created in the system module. 

I'm not too sure what should be in the model GUID field. I saw that the same field exists in the user role table in the system module and it has a length of 36.

 

Hope this helps!

 

Edit: I looked into the module and the tenant user is referring to an entity called ProjectUserRoles. These objects are created after startup by the "ASU_UserRoles" based on all the project user roles that are setup in the modeler. So if you add the "ASU_UserRoles" to a custom after start up microflow the user role will appear as an option when setting a user role for a tenant.

Edit 3: Here is an example that I setup if you want to take a look

https://drive.google.com/file/d/1yVSBv7wNzTQrFqDDQJoOewZVuaqkkl9p/view?usp=sharing

answered
0

thanks Austin, when I follow your steps I get the following errors, tried creating a 'TenantManager' role in module 'MyFirstModule' to no avail...

 

answered