From f6b3cb095d2a84312ec941faaaa4d818aadb6c8c Mon Sep 17 00:00:00 2001 From: Jesper Schulz-Wedde Date: Tue, 10 Oct 2023 14:34:21 +0200 Subject: [PATCH] Remove CLEAN21 code. (#236) Remove code with the CLEAN21 preprocessor tag. --- .../src/CryptographyManagement.Codeunit.al | 14 ------ .../src/ExtensionManagement.Page.al | 19 -------- .../src/MarketplaceExtnDeployment.Page.al | 29 ----------- .../App/OAuth2/OAuth2.Codeunit.al | 41 +--------------- .../UserPersonalizationRead.PermissionSet.al | 5 -- .../FeatureTelemetry.Codeunit.al | 48 ------------------- .../src/UserLoginTimeTracker.Codeunit.al | 12 ----- .../src/UserLoginTimeTrackerImpl.Codeunit.al | 9 ---- .../Test Runner/src/ALTestTool.Page.al | 11 ----- 9 files changed, 1 insertion(+), 187 deletions(-) diff --git a/src/System Application/App/Cryptography Management/src/CryptographyManagement.Codeunit.al b/src/System Application/App/Cryptography Management/src/CryptographyManagement.Codeunit.al index 3bcfcabb78..313af4db09 100644 --- a/src/System Application/App/Cryptography Management/src/CryptographyManagement.Codeunit.al +++ b/src/System Application/App/Cryptography Management/src/CryptographyManagement.Codeunit.al @@ -20,20 +20,6 @@ codeunit 1266 "Cryptography Management" var CryptographyManagementImpl: Codeunit "Cryptography Management Impl."; -#if not CLEAN21 - /// - /// Returns plain text as an encrypted value. - /// - /// The value to encrypt. - /// InputString can not exceed a length of 215 characters. - /// Encrypted value. - [Obsolete('Replaced by EncryptText', '21.0')] - procedure Encrypt(InputString: Text): Text - begin - exit(CryptographyManagementImpl.Encrypt(CopyStr(InputString, 1, 215))); - end; -#endif - /// /// Returns plain text as an encrypted value. /// diff --git a/src/System Application/App/Extension Management/src/ExtensionManagement.Page.al b/src/System Application/App/Extension Management/src/ExtensionManagement.Page.al index 34eb33db51..ea96d0c00e 100644 --- a/src/System Application/App/Extension Management/src/ExtensionManagement.Page.al +++ b/src/System Application/App/Extension Management/src/ExtensionManagement.Page.al @@ -173,25 +173,6 @@ page 2500 "Extension Management" ExtensionOperationImpl.UnpublishUninstalledPerTenantExtension(Rec."Package ID"); end; } -#if not CLEAN21 - action(Configure) - { - ApplicationArea = All; - Caption = 'Configure'; - Image = Setup; - Promoted = true; - PromotedOnly = true; - PromotedCategory = Category5; - RunObject = Page "Extension Settings"; - RunPageLink = "App ID" = field(ID); - Scope = Repeater; - ToolTip = 'Configure the extension.'; - Visible = false; - ObsoleteState = Pending; - ObsoleteTag = '21.0'; - ObsoleteReason = 'Removed as it clashes with Set up this app action.'; - } -#endif action(SetupApp) { ApplicationArea = All; diff --git a/src/System Application/App/Extension Management/src/MarketplaceExtnDeployment.Page.al b/src/System Application/App/Extension Management/src/MarketplaceExtnDeployment.Page.al index 7fa4e144b9..c3d7820ef4 100644 --- a/src/System Application/App/Extension Management/src/MarketplaceExtnDeployment.Page.al +++ b/src/System Application/App/Extension Management/src/MarketplaceExtnDeployment.Page.al @@ -44,35 +44,6 @@ page 2510 "Marketplace Extn Deployment" LanguageName := Language.GetWindowsLanguageName(LanguageID); end; } -#if not CLEAN21 - group(links) - { - ShowCaption = false; - Visible = false; - ObsoleteState = Pending; - ObsoleteTag = '21.0'; - ObsoleteReason = 'Not relevant anymore'; - - field(BestPractices; 'Read more about the best practices for installing and publishing extensions') - { - ApplicationArea = All; - ShowCaption = false; - Editable = false; - Visible = false; - ToolTip = 'Read more about the best practices for installing and publishing extensions.'; - ObsoleteState = Pending; - ObsoleteTag = '21.0'; - ObsoleteReason = 'Not relevant anymore'; - - trigger OnDrillDown() - var - ExtensionInstallationImpl: Codeunit "Extension Installation Impl"; - begin - Hyperlink(ExtensionInstallationImpl.GetInstallationBestPracticesURL()); - end; - } - } -#endif group(Info) { ShowCaption = false; diff --git a/src/System Application/App/OAuth2/OAuth2.Codeunit.al b/src/System Application/App/OAuth2/OAuth2.Codeunit.al index 903bc16e4e..f55966eea6 100644 --- a/src/System Application/App/OAuth2/OAuth2.Codeunit.al +++ b/src/System Application/App/OAuth2/OAuth2.Codeunit.al @@ -464,46 +464,7 @@ codeunit 501 OAuth2 begin OAuth2Impl.AcquireOnBehalfOfTokensByTokenCache(ClientId, ClientSecret, LoginHint, RedirectURL, Scopes, TokenCache, AccessToken, IdToken, NewTokenCache); end; - -#if not CLEAN21 - /// - /// Gets the token with username and password. - /// - /// The identity authorization provider URL. - /// The Application (client) ID that the Azure portal - App registrations experience assigned to your app. - /// A list of scopes that you want the user to consent to. - /// The user name, i.e. authentication email.. - /// The user credential. - /// Exit parameter containing the access token. - /// Exit parameter containing the id token. - [NonDebuggable] - [Obsolete('AcquireTokensWithUserCredentials is deprecated and will be removed in version 23.0. We recommend that you switch to any of the remaining non-deprecated functions in this class to acquire tokens already now.', '21.0')] - [TryFunction] - procedure AcquireTokensWithUserCredentials(OAuthAuthorityUrl: Text; ClientId: Text; Scopes: List of [Text]; UserName: Text; Credential: Text; var AccessToken: Text; var IdToken: Text) - begin - OAuth2Impl.AcquireTokensWithUserCredentials(OAuthAuthorityUrl, ClientId, Scopes, UserName, Credential, AccessToken, IdToken); - end; -#endif - -#if not CLEAN21 - /// - /// Gets the token with username and password. - /// - /// The identity authorization provider URL. - /// A list of scopes that you want the user to consent to. - /// The user name, i.e. authentication email.. - /// The user credential. - /// Exit parameter containing the access token. - /// Exit parameter containing the id token. - [NonDebuggable] - [Obsolete('AcquireTokensWithUserCredentials is deprecated and will be removed in version 23.0. We recommend that you switch to any of the remaining non-deprecated functions in this class to acquire tokens already now', '21.0')] - [Scope('OnPrem')] - [TryFunction] - procedure AcquireTokensWithUserCredentials(OAuthAuthorityUrl: Text; Scopes: List of [Text]; UserName: Text; Credential: Text; var AccessToken: Text; var IdToken: Text) - begin - OAuth2Impl.AcquireTokensWithUserCredentials(OAuthAuthorityUrl, Scopes, UserName, Credential, AccessToken, IdToken); - end; -#endif + #pragma warning restore AS0022 /// diff --git a/src/System Application/App/System Permissions/permissions/UserPersonalizationRead.PermissionSet.al b/src/System Application/App/System Permissions/permissions/UserPersonalizationRead.PermissionSet.al index 0046d199b3..16ec10a973 100644 --- a/src/System Application/App/System Permissions/permissions/UserPersonalizationRead.PermissionSet.al +++ b/src/System Application/App/System Permissions/permissions/UserPersonalizationRead.PermissionSet.al @@ -15,10 +15,5 @@ permissionset 92 "User Personalization - Read" Permissions = tabledata "Page Data Personalization" = R, tabledata "User Personalization" = R, tabledata "User Default Style Sheet" = R, -#if not CLEAN21 -#pragma warning disable AL0432 - tabledata "User Metadata" = R, -#pragma warning restore AL0432 -#endif tabledata "User Page Metadata" = R; } diff --git a/src/System Application/App/Telemetry/src/Feature Telemetry/FeatureTelemetry.Codeunit.al b/src/System Application/App/Telemetry/src/Feature Telemetry/FeatureTelemetry.Codeunit.al index 5b3236aa6a..09e225ca8e 100644 --- a/src/System Application/App/Telemetry/src/Feature Telemetry/FeatureTelemetry.Codeunit.al +++ b/src/System Application/App/Telemetry/src/Feature Telemetry/FeatureTelemetry.Codeunit.al @@ -210,53 +210,5 @@ codeunit 8703 "Feature Telemetry" NavApp.GetCallerModuleInfo(CallerModuleInfo); FeatureTelemetryImpl.LogUptake(EventId, FeatureName, FeatureUptakeStatus, IsPerUser, CustomDimensions, CallerModuleInfo); end; - -#if not CLEAN21 - /// - /// Sends telemetry about feature uptake. - /// - /// A unique ID of the event. - /// The name of the feature. - /// The new status of the feature uptake. - /// Specifies if the feature is targeted to be uptaken once for the tenant or uptaken individually by different users. - /// Not used. - /// - /// Expected feature uptake transitions: - /// "Discovered" -> "Set up" -> "Used" (and only in this order; for example, if for a given feature the first status was logged as "Set up", no telemetry will be emitted) - /// *Any state* -> "Undiscovered" (to reset the feature uptake status) - /// - [Obsolete('Other overloads should be used instead.', '21.0')] - procedure LogUptake(EventId: Text; FeatureName: Text; FeatureUptakeStatus: Enum "Feature Uptake Status"; IsPerUser: Boolean; PerformWriteTransactionsInASeparateSession: Boolean) - var - CallerModuleInfo: ModuleInfo; - DummyCustomDimensions: Dictionary of [Text, Text]; - begin - NavApp.GetCallerModuleInfo(CallerModuleInfo); - FeatureTelemetryImpl.LogUptake(EventId, FeatureName, FeatureUptakeStatus, IsPerUser, DummyCustomDimensions, CallerModuleInfo); - end; - - /// - /// Sends telemetry about feature uptake. - /// - /// A unique ID of the event. - /// The name of the feature. - /// The new status of the feature uptake. - /// Specifies if the feature is targeted to be uptaken once for the tenant or uptaken individually by different users. - /// Not used. - /// A dictionary containing additional information about the event. - /// - /// Expected feature uptake transitions: - /// "Discovered" -> "Set up" -> "Used" (and only in this order; for example, if for a given feature the first status was logged as "Set up", no telemetry will be emitted) - /// *Any state* -> "Undiscovered" (to reset the feature uptake status) - /// - [Obsolete('Other overloads should be used instead.', '21.0')] - procedure LogUptake(EventId: Text; FeatureName: Text; FeatureUptakeStatus: Enum "Feature Uptake Status"; IsPerUser: Boolean; PerformWriteTransactionsInASeparateSession: Boolean; CustomDimensions: Dictionary of [Text, Text]) - var - CallerModuleInfo: ModuleInfo; - begin - NavApp.GetCallerModuleInfo(CallerModuleInfo); - FeatureTelemetryImpl.LogUptake(EventId, FeatureName, FeatureUptakeStatus, IsPerUser, CustomDimensions, CallerModuleInfo); - end; -#endif } diff --git a/src/System Application/App/User Login Times/src/UserLoginTimeTracker.Codeunit.al b/src/System Application/App/User Login Times/src/UserLoginTimeTracker.Codeunit.al index f6f818d771..103a6e74a5 100644 --- a/src/System Application/App/User Login Times/src/UserLoginTimeTracker.Codeunit.al +++ b/src/System Application/App/User Login Times/src/UserLoginTimeTracker.Codeunit.al @@ -107,17 +107,5 @@ codeunit 9026 "User Login Time Tracker" begin UserLoginTimeTrackerImpl.CreateEnvironmentLoginInfo(); end; - -#if not CLEAN21 - /// - /// Publishes an event that is fired whenever a user's login information is created or updated. - /// - /// The User Security ID of the user that is being created or updated. - [IntegrationEvent(false, false)] - [Obsolete('Use OnAfterLogin in codeunit "System Initialization" instead', '21.0')] - internal procedure OnAfterCreateorUpdateLoginInfo(UserSecurityId: Guid) - begin - end; -#endif } diff --git a/src/System Application/App/User Login Times/src/UserLoginTimeTrackerImpl.Codeunit.al b/src/System Application/App/User Login Times/src/UserLoginTimeTrackerImpl.Codeunit.al index 0b7a47a0ec..e2b9413a63 100644 --- a/src/System Application/App/User Login Times/src/UserLoginTimeTrackerImpl.Codeunit.al +++ b/src/System Application/App/User Login Times/src/UserLoginTimeTrackerImpl.Codeunit.al @@ -98,9 +98,6 @@ codeunit 9013 "User Login Time Tracker Impl." procedure CreateOrUpdateLoginInfo() var UserLogin: Record "User Login"; -#if not CLEAN21 - UserLoginTimeTracker: Codeunit "User Login Time Tracker"; -#endif Now: DateTime; begin Now := CurrentDateTime(); @@ -129,12 +126,6 @@ codeunit 9013 "User Login Time Tracker Impl." Session.LogMessage('0000KQX', CouldNotInsertUserLoginErr, Verbosity::Error, DataClassification::SystemMetadata, TelemetryScope::ExtensionPublisher, 'Category', UserLoginCategoryLbl); end; Commit(); - -#if not CLEAN21 -#pragma warning disable AL0432 - UserLoginTimeTracker.OnAfterCreateorUpdateLoginInfo(UserSecurityId()); -#pragma warning restore AL0432 -#endif end; var diff --git a/src/Tools/Test Framework/Test Runner/src/ALTestTool.Page.al b/src/Tools/Test Framework/Test Runner/src/ALTestTool.Page.al index d0ab67f6a1..2def0a1c5c 100644 --- a/src/Tools/Test Framework/Test Runner/src/ALTestTool.Page.al +++ b/src/Tools/Test Framework/Test Runner/src/ALTestTool.Page.al @@ -220,17 +220,6 @@ page 130451 "AL Test Tool" ToolTip = 'Specifies the number of Tests Not Executed'; } } - -#if not CLEAN21 - group(Control13) - { - ShowCaption = false; - Visible = false; - ObsoleteState = Pending; - ObsoleteReason = 'Group will be deleted, control was moved to the top of the page.'; - ObsoleteTag = '21.0'; - } -#endif } }