Skip to content

Commit

Permalink
Remove CLEAN21 code. (#236)
Browse files Browse the repository at this point in the history
Remove code with the CLEAN21 preprocessor tag.
  • Loading branch information
JesperSchulz authored Oct 10, 2023
1 parent d7e0674 commit f6b3cb0
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 187 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,6 @@ codeunit 1266 "Cryptography Management"
var
CryptographyManagementImpl: Codeunit "Cryptography Management Impl.";

#if not CLEAN21
/// <summary>
/// Returns plain text as an encrypted value.
/// </summary>
/// <param name="InputString">The value to encrypt.</param>
/// <remarks>InputString can not exceed a length of 215 characters.</remarks>
/// <returns>Encrypted value.</returns>
[Obsolete('Replaced by EncryptText', '21.0')]
procedure Encrypt(InputString: Text): Text
begin
exit(CryptographyManagementImpl.Encrypt(CopyStr(InputString, 1, 215)));
end;
#endif

/// <summary>
/// Returns plain text as an encrypted value.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
41 changes: 1 addition & 40 deletions src/System Application/App/OAuth2/OAuth2.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -464,46 +464,7 @@ codeunit 501 OAuth2
begin
OAuth2Impl.AcquireOnBehalfOfTokensByTokenCache(ClientId, ClientSecret, LoginHint, RedirectURL, Scopes, TokenCache, AccessToken, IdToken, NewTokenCache);
end;

#if not CLEAN21
/// <summary>
/// Gets the token with username and password.
/// </summary>
/// <param name="OAuthAuthorityUrl">The identity authorization provider URL.</param>
/// <param name="ClientId">The Application (client) ID that the Azure portal - App registrations experience assigned to your app.</param>
/// <param name="Scopes">A list of scopes that you want the user to consent to.</param>
/// <param name="UserName">The user name, i.e. authentication email..</param>
/// <param name="Credential">The user credential.</param>
/// <param name="AccessToken">Exit parameter containing the access token.</param>
/// <param name="IdToken">Exit parameter containing the id token.</param>
[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
/// <summary>
/// Gets the token with username and password.
/// </summary>
/// <param name="OAuthAuthorityUrl">The identity authorization provider URL.</param>
/// <param name="Scopes">A list of scopes that you want the user to consent to.</param>
/// <param name="UserName">The user name, i.e. authentication email..</param>
/// <param name="Credential">The user credential.</param>
/// <param name="AccessToken">Exit parameter containing the access token.</param>
/// <param name="IdToken">Exit parameter containing the id token.</param>
[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

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -210,53 +210,5 @@ codeunit 8703 "Feature Telemetry"
NavApp.GetCallerModuleInfo(CallerModuleInfo);
FeatureTelemetryImpl.LogUptake(EventId, FeatureName, FeatureUptakeStatus, IsPerUser, CustomDimensions, CallerModuleInfo);
end;

#if not CLEAN21
/// <summary>
/// Sends telemetry about feature uptake.
/// </summary>
/// <param name="EventId">A unique ID of the event.</param>
/// <param name="FeatureName">The name of the feature.</param>
/// <param name="FeatureUptakeStatus">The new status of the feature uptake.</param>
/// <param name="IsPerUser">Specifies if the feature is targeted to be uptaken once for the tenant or uptaken individually by different users.</param>
/// <param name="PerformWriteTransactionsInASeparateSession">Not used.</param>
/// <remarks>
/// 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)
/// </remarks>
[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;

/// <summary>
/// Sends telemetry about feature uptake.
/// </summary>
/// <param name="EventId">A unique ID of the event.</param>
/// <param name="FeatureName">The name of the feature.</param>
/// <param name="FeatureUptakeStatus">The new status of the feature uptake.</param>
/// <param name="IsPerUser">Specifies if the feature is targeted to be uptaken once for the tenant or uptaken individually by different users.</param>
/// <param name="PerformWriteTransactionsInASeparateSession">Not used.</param>
/// <param name="CustomDimensions">A dictionary containing additional information about the event.</param>
/// <remarks>
/// 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)
/// </remarks>
[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
}

Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,5 @@ codeunit 9026 "User Login Time Tracker"
begin
UserLoginTimeTrackerImpl.CreateEnvironmentLoginInfo();
end;

#if not CLEAN21
/// <summary>
/// Publishes an event that is fired whenever a user's login information is created or updated.
/// </summary>
/// <param name="UserSecurityId">The User Security ID of the user that is being created or updated.</param>
[IntegrationEvent(false, false)]
[Obsolete('Use OnAfterLogin in codeunit "System Initialization" instead', '21.0')]
internal procedure OnAfterCreateorUpdateLoginInfo(UserSecurityId: Guid)
begin
end;
#endif
}

Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down
11 changes: 0 additions & 11 deletions src/Tools/Test Framework/Test Runner/src/ALTestTool.Page.al
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down

0 comments on commit f6b3cb0

Please sign in to comment.