Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Support for more than 1 portal #9064


User avatar
0
SEB_ADMIN created

We have a requirement where for users of certain role, they need to be redirected to a different portal , with different theme settings etc..although they might belong to the same tenant.

What are the configuration changes required to support 2 different front ends ( with different navigation, theme etc, ) for the same tenant using the same API layer ( Application).

Do I have to deploy as a seperate web app for the 2 front ends ? .Please advise. How much of a change will be required to support this requirement ?.

Also advise on the procedure to do it..


8 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @SEB_ADMIN,

    This is totally related to your needs. It can be handled in the same application or can be with a different website. Could you explain a bit more about your use case so we can offer you a specific solution ?

    For example, do you want those users to see different pages or same pages ?

  • User Avatar
    0
    SEB_ADMIN created

    Hi- The requirement is certain class of users ( say specific role "End User" ) need to have their own themesettings, navigation. menu and access to pages. (More like for an end user) rather than for a Tenant Admin ( say for e.g) as Tenant admin has more access to functionality. it is not per user , but for a group of users ( having same role). Again they dont need the ability to control any of these. It is just we want to deploy specific themesetting , navigation etc for certain role compared to any other tenant user/admin.

    Is it possible to acheive this without duplicating the front end (Angular part) as themesettings are loaded based on the tenant and the end users will belong to the same tenant. Is it possible to segregate UI customization & navigation based on the user role ?

    Regards, Sesha K.

  • User Avatar
    0
    SEB_ADMIN created

    The group of users ( of certain role) all need to see same pages/menu options etc..I wanted to make clear.

  • User Avatar
    0
    musa.demir created

    Hello @SEB_ADMIN

    If you create a role and set permissions of the role to see the same pages and not to see some other pages, you can basically handle grouping with roles.

    But changing routing requires more than that.

    What I understand is that: For example there are two groups and they want to go to Page1. Page1 will be located at https://localhost:44302/App/Page1 for group1, but it will be located for example at https://localhost:44302/XYZ. But as a result, both of them go to the same page. Am I right? If it is what you need you can create as many routes as you need and then redirect them to the same controller. That may help you https://stackoverflow.com/a/35298728 or you can do that:

    public class MyController : AbpZeroTemplateControllerBase
    {
    	public ActionResult Page1()
    	{
    		return View();
    	}
    
    	public ActionResult XYZ()
    	{
    		return RedirectToAction("Page1");
    	}
    }
    
  • User Avatar
    0
    SEB_ADMIN created

    Hello - This is for Angular Application with .NET Core

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    In order to select the default route/page for a specific role or user, you can modify https://github.com/aspnetzero/aspnet-zero-core/blob/dev/angular/src/app/shared/common/auth/auth-route-guard.ts#L73.

    I think it is better to use the same app for all users and restrict page access for public users using Roles.

  • User Avatar
    0
    SEB_ADMIN created

    Is it possible to have a different theme settings though if using the same application ?.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @SEB_ADMIN,

    Yes, you can customize it here https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Application/Sessions/SessionAppService.cs#L50 according to your custom logic. Then, Angular app will use the theme you return from server.