From af54d915291d7b56824d2f337152099cabfcf4c1 Mon Sep 17 00:00:00 2001 From: Daniel Bolef Date: Wed, 21 Sep 2022 10:25:42 -0500 Subject: [PATCH] Pass TabId instead of PortalId --- .../MenuControllers/PagesMenuController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dnn.AdminExperience/Dnn.PersonaBar.Extensions/MenuControllers/PagesMenuController.cs b/Dnn.AdminExperience/Dnn.PersonaBar.Extensions/MenuControllers/PagesMenuController.cs index fa0227cfcb4..d27c8d8be48 100644 --- a/Dnn.AdminExperience/Dnn.PersonaBar.Extensions/MenuControllers/PagesMenuController.cs +++ b/Dnn.AdminExperience/Dnn.PersonaBar.Extensions/MenuControllers/PagesMenuController.cs @@ -45,7 +45,7 @@ public IDictionary GetSettings(MenuItem menuItem) var settings = new Dictionary { { "canSeePagesList", this.securityService.CanViewPageList(menuItem.MenuId) }, - { "canAddPages", this.securityService.CanAddPage(PortalSettings.Current.PortalId) }, + { "canAddPages", this.securityService.CanAddPage(PortalSettings.Current?.ActiveTab?.TabID ?? 0) }, { "portalName", PortalSettings.Current.PortalName }, { "currentPagePermissions", this.securityService.GetCurrentPagePermissions() }, { "currentPageName", PortalSettings.Current?.ActiveTab?.TabName },