From d8e7b7cf6bb9fd2690bd3c77441fb929be62d04d Mon Sep 17 00:00:00 2001 From: Onat Buyukakkus <55088871+onbuyuka@users.noreply.github.com> Date: Thu, 26 Mar 2026 09:37:59 +0100 Subject: [PATCH 1/2] Remove MCP feature flag check (EnableMcpAccess) The EnableMcpAccess feature key is no longer used. Remove the IsFeatureEnabled() procedure, the OnOpenPage guard, associated labels, and the Feature Key dependency from app.json. Fixes AB#626506 Co-Authored-By: Claude Opus 4.6 (1M context) --- src/System Application/App/MCP/app.json | 6 ------ .../MCPConfigImplementation.Codeunit.al | 10 ---------- .../Configuration/Pages/MCPConfigList.Page.al | 16 ---------------- 3 files changed, 32 deletions(-) diff --git a/src/System Application/App/MCP/app.json b/src/System Application/App/MCP/app.json index 39d17b2cb0..a69cbd7af8 100644 --- a/src/System Application/App/MCP/app.json +++ b/src/System Application/App/MCP/app.json @@ -29,12 +29,6 @@ "publisher": "Microsoft", "version": "29.0.0.0" }, - { - "id": "ae59aed1-040c-453c-9585-fe9da2f8211e", - "name": "Feature Key", - "publisher": "Microsoft", - "version": "29.0.0.0" - }, { "id": "1b2efb4b-8c44-4d74-a56f-60646645bb21", "name": "URI", diff --git a/src/System Application/App/MCP/src/Configuration/Codeunits/MCPConfigImplementation.Codeunit.al b/src/System Application/App/MCP/src/Configuration/Codeunits/MCPConfigImplementation.Codeunit.al index 43d2e57c77..f321741162 100644 --- a/src/System Application/App/MCP/src/Configuration/Codeunits/MCPConfigImplementation.Codeunit.al +++ b/src/System Application/App/MCP/src/Configuration/Codeunits/MCPConfigImplementation.Codeunit.al @@ -1196,14 +1196,4 @@ codeunit 8351 "MCP Config Implementation" Session.LogAuditMessage(StrSubstNo(MCPConfigurationAuditDeletedLbl, MCPConfiguration.Name, UserSecurityId(), CompanyName()), SecurityOperationResult::Success, AuditCategory::ApplicationManagement, 3, 0); end; #endregion - -#if not CLEAN28 - internal procedure IsFeatureEnabled(): Boolean - var - FeatureManagementFacade: Codeunit "Feature Management Facade"; - EnableMcpAccessTok: Label 'EnableMcpAccess', Locked = true; - begin - exit(FeatureManagementFacade.IsEnabled(EnableMcpAccessTok)); - end; -#endif } diff --git a/src/System Application/App/MCP/src/Configuration/Pages/MCPConfigList.Page.al b/src/System Application/App/MCP/src/Configuration/Pages/MCPConfigList.Page.al index 79a9fc431a..fbbd94282d 100644 --- a/src/System Application/App/MCP/src/Configuration/Pages/MCPConfigList.Page.al +++ b/src/System Application/App/MCP/src/Configuration/Pages/MCPConfigList.Page.al @@ -205,19 +205,7 @@ page 8350 "MCP Config List" } trigger OnOpenPage() -#if not CLEAN28 - var - FeatureNotEnabledErrorInfo: ErrorInfo; -#endif begin -#if not CLEAN28 - if not MCPConfigImplementation.IsFeatureEnabled() then begin - FeatureNotEnabledErrorInfo.Message := FeatureNotEnabledErr; - FeatureNotEnabledErrorInfo.AddNavigationAction(GoToFeatureManagementLbl); - FeatureNotEnabledErrorInfo.PageNo := Page::"Feature Management"; - Error(FeatureNotEnabledErrorInfo); - end; -#endif HadActiveConfigsOnOpen := not MCPConfigImplementation.HasNoActiveConfigurations(); end; @@ -233,9 +221,5 @@ page 8350 "MCP Config List" var MCPConfigImplementation: Codeunit "MCP Config Implementation"; HadActiveConfigsOnOpen: Boolean; -#if not CLEAN28 - FeatureNotEnabledErr: Label 'MCP server feature is not enabled. Please contact your system administrator to enable the feature.'; - GoToFeatureManagementLbl: Label 'Go to Feature Management'; -#endif } \ No newline at end of file From ae3a4d6ea2742601bd27c576111e81fa5aaee79c Mon Sep 17 00:00:00 2001 From: Onat Buyukakkus <55088871+onbuyuka@users.noreply.github.com> Date: Thu, 26 Mar 2026 09:59:10 +0100 Subject: [PATCH 2/2] Remove unused using directives for System.Environment.Configuration Fixes AL0792 compiler errors from the feature flag removal. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../Codeunits/MCPConfigImplementation.Codeunit.al | 3 --- .../App/MCP/src/Configuration/Pages/MCPConfigList.Page.al | 4 ---- 2 files changed, 7 deletions(-) diff --git a/src/System Application/App/MCP/src/Configuration/Codeunits/MCPConfigImplementation.Codeunit.al b/src/System Application/App/MCP/src/Configuration/Codeunits/MCPConfigImplementation.Codeunit.al index f321741162..d520b22569 100644 --- a/src/System Application/App/MCP/src/Configuration/Codeunits/MCPConfigImplementation.Codeunit.al +++ b/src/System Application/App/MCP/src/Configuration/Codeunits/MCPConfigImplementation.Codeunit.al @@ -7,9 +7,6 @@ namespace System.MCP; using System.Azure.Identity; using System.Environment; -#if not CLEAN28 -using System.Environment.Configuration; -#endif using System.Feedback; using System.Reflection; using System.Utilities; diff --git a/src/System Application/App/MCP/src/Configuration/Pages/MCPConfigList.Page.al b/src/System Application/App/MCP/src/Configuration/Pages/MCPConfigList.Page.al index fbbd94282d..73e7ccbcd5 100644 --- a/src/System Application/App/MCP/src/Configuration/Pages/MCPConfigList.Page.al +++ b/src/System Application/App/MCP/src/Configuration/Pages/MCPConfigList.Page.al @@ -5,10 +5,6 @@ namespace System.MCP; -#if not CLEAN28 -using System.Environment.Configuration; -#endif - page 8350 "MCP Config List" { PageType = List;