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

Upgrade from V6.0.0 to V6.1.0 Administration Menu Heading Always Visible #5809


User avatar
0
mdframe created

We upgraded from ANZ v6.0 to v6.1 Angular + Core today and found that all users without Administration rights still have the Administration menu heading. Did we miss something in the code merge? We performed EF update-database, cleared browser cache, rebuilt the proxy with ./refresh.bat, and performed a new yarn for all package updates.


7 Answer(s)
  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, there are some changes to the menu item declaration for angular project.

    you can see the updates of the new usage at https://github.com/aspnetzero/aspnet-zero-core/issues/1632#issuecomment-428900148

  • User Avatar
    0
    mdframe created

    This sounds like a major breaking change in a minor release and as such would require better documentation than a reference to a github issue which requires end users to make a change to the core ASPNETZERO product. Administration menu already exists and we did not touch anything around ADMIN privileges.

  • User Avatar
    0
    ryancyq created
    Support Team

    hi, @mdframe, the changes only introduce featureDependency (which it doesn't exist in previous version) and requireAuthentication (which targeting at menu items that are not using permissiom check)

    i am assuming that you are using permission checks on the admin menu items. can you share the code for your admin menu items if possible?

  • User Avatar
    0
    mdframe created

    I will share my code however I have not made any changes to the Administration menu options, ever. This was working in v6.0.0 however the Administration menu header is now showing all the time no matter what permissions were set. Again, I have not changed any of the Administration menu's code in any way, the code is the exact same as what got downloaded when I generated the project.

    This is why I asked if something changed in my original request that I need to address from the code merge meaning did something go wrong.

  • User Avatar
    0
    ismcagdas created
    Support Team
  • User Avatar
    0
    mdframe created

    Even if this user has never had any Administrative menu item?

    I was earlier for the source code. I have made no changes to Administration from the default download.

    getMenu(): AppMenu {
            return new AppMenu('MainMenu', 'MainMenu', [           
                new AppMenuItem('Dashboard', 'Pages.Administration.Host.Dashboard', 'flaticon-line-graph', '/app/admin/hostDashboard'),
                new AppMenuItem('Dashboard', 'Pages.Tenant.Dashboard', 'flaticon-line-graph', '/app/main/dashboard'),
                new AppMenuItem('Tenants', 'Pages.Tenants', 'flaticon-list-3', '/app/admin/tenants'),
                new AppMenuItem('Editions', 'Pages.Editions', 'flaticon-app', '/app/admin/editions'),                                
                
                 new AppMenuItem('Administration', '', 'flaticon-interface-8', '', [
                    new AppMenuItem('OrganizationUnits', 'Pages.Administration.OrganizationUnits', 'flaticon-map', '/app/admin/organization-units'),
                    new AppMenuItem('Roles', 'Pages.Administration.Roles', 'flaticon-suitcase', '/app/admin/roles'),
                    new AppMenuItem('Users', 'Pages.Administration.Users', 'flaticon-users', '/app/admin/users'),
                    new AppMenuItem('Languages', 'Pages.Administration.Languages', 'flaticon-tabs', '/app/admin/languages'),
                    new AppMenuItem('AuditLogs', 'Pages.Administration.AuditLogs', 'flaticon-folder-1', '/app/admin/auditLogs'),
                    new AppMenuItem('Maintenance', 'Pages.Administration.Host.Maintenance', 'flaticon-lock', '/app/admin/maintenance'),
                    new AppMenuItem('Subscription', 'Pages.Administration.Tenant.SubscriptionManagement', 'flaticon-refresh', '/app/admin/subscription-management'),
                    new AppMenuItem('VisualSettings', 'Pages.Administration.UiCustomization', 'flaticon-medical', '/app/admin/ui-customization'),
                    new AppMenuItem('Settings', 'Pages.Administration.Host.Settings', 'flaticon-settings', '/app/admin/hostSettings'),
                    new AppMenuItem('Settings', 'Pages.Administration.Tenant.Settings', 'flaticon-settings', '/app/admin/tenantSettings')
                ]),
                
                new AppMenuItem('Configuration', '', 'flaticon-interface-8', '', [
                    new AppMenuItem('Codes', 'Pages.Codes', 'flaticon-more', '/app/main/codes/codes'),
                    new AppMenuItem('Warehousing', '', 'flaticon-folder-1', '', [
                        new AppMenuItem('Warehouse', 'Pages.Warehouses', 'flaticon-settings', '/app/main/configuration/warehouses'),
                        new AppMenuItem('Zones', 'Pages.Zones', 'flaticon-more', '/app/main/warehouses/zones'),
                        new AppMenuItem('Aisles', 'Pages.Aisles', 'flaticon-more', '/app/main/warehouses/aisles'),
                        new AppMenuItem('Racks', 'Pages.Racks', 'flaticon-more', '/app/main/warehouses/racks'),
                        new AppMenuItem('Levels', 'Pages.Levels', 'flaticon-more', '/app/main/warehouses/levels'),
                        new AppMenuItem('Bins', 'Pages.Bins', 'flaticon-more', '/app/main/warehouses/bins'),
                    ]),]),
    
                new AppMenuItem('Inventory', '', 'flaticon-list-3', '', [
                    new AppMenuItem('Categories', 'Pages.Categories', 'flaticon-more', '/app/main/inventory/categories'),
                    new AppMenuItem('Products', 'Pages.Products', 'flaticon-more', '/app/main/inventory/products'),
                ]),
    
                new AppMenuItem('DemoUiComponents', 'Pages.DemoUiComponents', 'flaticon-shapes', '/app/admin/demo-ui-components')
    
                
            ]);
        }
    
  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, the fixes are in place for v6.2.

    See https://github.com/aspnetzero/aspnet-zero-core/pull/1818.

    You can apply those changes youself before upgrading to the next version