Base solution for your next web application
Open Closed

Script for connect to specific username and tenant #9621


User avatar
0
datalab created

Prerequisites

Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • What is your product version?
  • Module zero 8.4
  • What is your product type (Angular or MVC)?
  • Angular
  • What is product framework type (.net framework or .net core)? .net core 3.1

Hello I have a specific user that is created for each tenant with the same username and password who must be able to manage tasks that i asigned from different tenants. Each time the user login to a tenant is shown a table with the tasks that the various tenants have assigned to him, I get this data using a query filtered data by username and disabling the filter for tenant using (CurrentUnitOfWork.DisableFilter (AbpDataFilters.MustHaveTenant) ) However, whenever the user has need to update the task data, he must log out and log in again on the specific tenant, it is possible to create a script that allows the user to connect to the specified tenant by clicking to a link or button ?. I have this information in task data TenantId, TenancyName, UserId, Username.

Tankyou


1 Answer(s)
  • User Avatar
    0
    datalab created

    Tanks i found the switchToAccount function, that resolve my problem.

    Best Regards Dennis Bellancini