Base solution for your next web application
Open Closed

How to set asp.net zero angular project from private (only register users) to public (available for not register users)? #6121


User avatar
0
mirzanas created

Currently we prepare our asp.net zero project (not the "ASP.NET Core/MVC based public web site", but that side with angular/metronic) to the public users maybe could you suggest easiest way how to achieve that?

Currently we see the trouble with angular because by default on each start of the project web UI call the "/AbpUserConfiguration/GetAll" in AppPreBootstrap.ts and after set all properties of "abp" like clock, localization, etc. So first we think maybe the easiest way would be modify back-end code in "AbpUserConfigurationController" which use "abpUserConfigurationBuilder.GetAll()" (looks like this method set all return values which are after used in angular) and prepare some default return config for all not register users. Still not sure if this is the best approach?! However, to implement this, we need override abpUserConfigurationBuilder > GetAll() method, how we could do this?


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

    Hi @mirzanas

    AbpUserConfigurationController is defined in ABP. Instead of using it, you can create your own Controller, for example MyUserConfigurationController and use it like "/MyUserConfiguration/GetAll" in AppPreBootstrap.ts.

    In that Controller's GetAll Action you can check if AbpSession.UserId hsa value or not and return appropriate result to client.