Open Closed

Would like to have the complete Menu In Profile Management As well #1751


User avatar
0
viswajwalith created
  • ABP Framework version: v4.4
  • UI type: MVC
  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Currently We are not seeing the menu of our Web Application (UI) in Profile Management as both different projects. we would like to have Profile Management to have the same menu/optios as in Web application.

Is there any way to do?


2 Answer(s)
  • User Avatar
    0
    berkansasmaz created
    Support Team .NET Developer

    Hi,

    To do this, you create a common Web project (eg MyProjectName.Web.Common) and move all the information you will use in common, such as MyProjectNameMenuContributor, there. Both projects must have a reference here.

    There are two difficulties here:

    1. For example, you must depend on GroupName for AuditLogs menu and some projects for required permissions, if any, so you can remove them from MyProjectName.Web to not reference them in two different places because those dependencies will already come with MyProjectName.Web.Common.

    2. You must get the full URL information for the menus, you can do this in 3 ways. a. Hard coded :( b. By creating a class that holds your URL information to the MyProjectName.Domain.Shared project.

        public static class MyProjectNameExternalUrls
        {
    #if DEBUG
            public const string MyProjectNameAccount = "https://localhost:44333";
            public const string MyProjectNameWeb = "https://localhost:44325";
    #else
            public const string MyProjectNameAccount = "https://account.mydomain.io";
            public const string MyProjectNameWeb = "https://mydomain.io";
    #endif
        }
    

    The advantage of this is that the menu urls change according to the environment, and the disadvantage is that it duplicates the URL information. Because this information is already available in appsettings.json.

    c. You can create the structure that suits your needs by using the Options pattern.

    In my opinion, the shortest and acceptable one is to create a class like MyProjectNameExternalUrls, but if you have the time, the best solution is to design the necessary structure using the options pattern.

    I hope the information I have provided will be of use to you :)

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 13, 2024, 06:09