diff --git a/src/System Application/App/Azure AD Plan/src/AzureADPlanImpl.Codeunit.al b/src/System Application/App/Azure AD Plan/src/AzureADPlanImpl.Codeunit.al index 515f5ae2d6..f89e1d0181 100644 --- a/src/System Application/App/Azure AD Plan/src/AzureADPlanImpl.Codeunit.al +++ b/src/System Application/App/Azure AD Plan/src/AzureADPlanImpl.Codeunit.al @@ -667,7 +667,7 @@ codeunit 9018 "Azure AD Plan Impl." begin case true of AzureADGraphUser.IsUserDelegatedAdmin(): - PlanId := PlanIds.GetDelegatedAdminPlanId(); + PlanId := PlanIds.GetGlobalAdminPlanId(); AzureADGraphUser.IsUserDelegatedHelpdesk(): PlanId := PlanIds.GetHelpDeskPlanId(); else begin @@ -805,7 +805,7 @@ codeunit 9018 "Azure AD Plan Impl." begin exit( IsPlanAssignedToUser(PlanIds.GetGlobalAdminPlanId(), SecurityID) - or IsPlanAssignedToUser(PlanIds.GetDelegatedAdminPlanId(), SecurityID) + or IsPlanAssignedToUser(PlanIds.GetGlobalAdminPlanId(), SecurityID) or IsPlanAssignedToUser(PlanIds.GetD365AdminPlanId(), SecurityID)); end; diff --git a/src/System Application/App/Azure AD Plan/src/PlanIds.Codeunit.al b/src/System Application/App/Azure AD Plan/src/PlanIds.Codeunit.al index 8691f58b97..8e0a4f9dec 100644 --- a/src/System Application/App/Azure AD Plan/src/PlanIds.Codeunit.al +++ b/src/System Application/App/Azure AD Plan/src/PlanIds.Codeunit.al @@ -105,28 +105,52 @@ codeunit 9027 "Plan Ids" exit(ExternalAccountantPlanGUIDTxt); end; +#if not CLEAN32 /// /// Returns the ID for the Delegated Admin agent - Partner plan. /// /// The ID for the Delegated Admin agent - Partner plan. + [Obsolete('Use GetDelegatedGlobalAdminPlanId instead', '28.0')] procedure GetDelegatedAdminPlanId(): Guid begin exit(DelegatedAdminGUIDTxt); end; +#endif + /// + /// Returns the ID for the Delegated Admin agent - Partner plan. + /// + /// The ID for the Delegated Admin agent - Partner plan. + procedure GetDelegatedGlobalAdminPlanId(): Guid + begin + exit(DelegatedAdminGUIDTxt); + end; + +#if not CLEAN32 /// /// Returns the ID for the Delegated BC Admin agent - Partner plan. /// /// The ID for the Delegated BC Admin agent - Partner plan. + [Obsolete('Use GetD365BCAdminPlanId instead', '28.0')] procedure GetDelegatedBCAdminPlanId(): Guid begin exit(BCAdminPartnerGUIDTxt); end; +#endif + + /// + /// Returns the ID for the Delegated BC Admin agent - Partner plan. + /// + /// The ID for the Delegated BC Admin agent - Partner plan. + procedure GetD365BCAdminPlanId(): Guid + begin + exit(BCAdminPartnerGUIDTxt); + end; /// - /// Returns the ID for the Internal BC Administrator plan. + /// Returns the ID for the D365 Business Central Administrator plan. /// - /// The ID for the Internal BC Administrator plan. + /// The ID for the D365 Business Central Administrator plan. procedure GetBCAdminPlanId(): Guid begin exit(BCAdminGUIDTxt); diff --git a/src/System Application/App/Azure AD Plan/src/PlanInstaller.Codeunit.al b/src/System Application/App/Azure AD Plan/src/PlanInstaller.Codeunit.al index a2825a1001..474582b623 100644 --- a/src/System Application/App/Azure AD Plan/src/PlanInstaller.Codeunit.al +++ b/src/System Application/App/Azure AD Plan/src/PlanInstaller.Codeunit.al @@ -32,13 +32,13 @@ codeunit 9056 "Plan Installer" UpgradeTag: Codeunit "Upgrade Tag"; PlanUpgradeTag: Codeunit "Plan Upgrade Tag"; begin - CreatePlan(PlanIds.GetDelegatedBCAdminPlanId(), 'Delegated BC Admin agent - Partner', 9022, 'FFF16A30-3B0B-47CB-9751-54A5C8F634ED'); - CreatePlan(PlanIds.GetBCAdminPlanId(), 'Internal BC Administrator', 9022, 'A2BB1194-FC0B-4C6B-840F-963851B783C9'); - CreatePlan(PlanIds.GetDelegatedAdminPlanId(), 'Delegated Admin agent - Partner', 9022, '7584DDCA-27B8-E911-BB26-000D3A2B005C'); - CreatePlan(PlanIds.GetHelpDeskPlanId(), 'Delegated Helpdesk agent - Partner', 9022, '8884DDCA-27B8-E911-BB26-000D3A2B005C'); - CreatePlan(PlanIds.GetGlobalAdminPlanId(), 'Internal Administrator', 9022, '9B84DDCA-27B8-E911-BB26-000D3A2B005C'); // Global admin + CreatePlan(PlanIds.GetD365BCAdminPlanId(), 'Delegated D365 Business Central Administrator', 9022, 'FFF16A30-3B0B-47CB-9751-54A5C8F634ED'); + CreatePlan(PlanIds.GetBCAdminPlanId(), 'D365 Business Central Administrator', 9022, 'A2BB1194-FC0B-4C6B-840F-963851B783C9'); + CreatePlan(PlanIds.GetDelegatedGlobalAdminPlanId(), 'Delegated Global Administrator', 9022, '7584DDCA-27B8-E911-BB26-000D3A2B005C'); + CreatePlan(PlanIds.GetHelpDeskPlanId(), 'Delegated Helpdesk Administrator', 9022, '8884DDCA-27B8-E911-BB26-000D3A2B005C'); + CreatePlan(PlanIds.GetGlobalAdminPlanId(), 'Global Administrator', 9022, '9B84DDCA-27B8-E911-BB26-000D3A2B005C'); // Global admin CreatePlan(PlanIds.GetD365AdminPlanId(), 'Dynamics 365 Administrator', 9022, 'F67B9B96-C667-4DD2-B370-FA065A895C9D'); - CreatePlan(PlanIds.GetD365AdminPartnerPlanId(), 'Delegated Dynamics 365 Admin agent - Partner', 9022, '5C28E514-8AFD-4158-B8C0-93A5915938F9'); + CreatePlan(PlanIds.GetD365AdminPartnerPlanId(), 'Delegated Dynamics 365 Administrator', 9022, '5C28E514-8AFD-4158-B8C0-93A5915938F9'); CreatePlan(PlanIds.GetEssentialISVPlanId(), 'Dynamics 365 Business Central Essential - Embedded', 9022, '2E84DDCA-27B8-E911-BB26-000D3A2B005C'); CreatePlan(PlanIds.GetTeamMemberPlanId(), 'Dynamics 365 Business Central Team Member', 9028, '5784DDCA-27B8-E911-BB26-000D3A2B005C'); CreatePlan(PlanIds.GetMicrosoft365PlanId(), 'Microsoft 365', 8999, '57ff2da0-773e-42df-b2af-ffb7a2317929'); diff --git a/src/System Application/App/Azure AD Plan/src/PlanUpgrade.Codeunit.al b/src/System Application/App/Azure AD Plan/src/PlanUpgrade.Codeunit.al index cf616e6732..81bc827d7e 100644 --- a/src/System Application/App/Azure AD Plan/src/PlanUpgrade.Codeunit.al +++ b/src/System Application/App/Azure AD Plan/src/PlanUpgrade.Codeunit.al @@ -24,6 +24,7 @@ codeunit 9057 "Plan Upgrade" begin UpdateSubscriptionPlan(); RenamePlansAndDeleteOldPlans(); + RenameDelegatedAdminPlans(); RenameTeamMemberPlan(); RenameDevicePlan(); AddPremiumPartnerSandbox(); @@ -86,7 +87,7 @@ codeunit 9057 "Plan Upgrade" RenameOrCreatePlan(PlanIds.GetExternalAccountantPlanId(), 'Dynamics 365 Business Central External Accountant'); RenameOrCreatePlan(PlanIds.GetPremiumISVPlanId(), 'Dynamics 365 Business Central Premium - Embedded'); RenameOrCreatePlan(PlanIds.GetViralSignupPlanId(), 'Dynamics 365 Business Central for IWs'); - RenameOrCreatePlan(PlanIds.GetDelegatedAdminPlanId(), 'Delegated Admin agent - Partner'); + RenameOrCreatePlan(PlanIds.GetGlobalAdminPlanId(), 'Delegated Admin agent - Partner'); RenameOrCreatePlan(PlanIds.GetHelpDeskPlanId(), 'Delegated Helpdesk agent - Partner'); RenameOrCreatePlan('996DEF3D-B36C-4153-8607-A6FD3C01B89F', 'D365 Business Central Infrastructure'); @@ -96,11 +97,33 @@ codeunit 9057 "Plan Upgrade" DeletePlan('46764787-E039-4AB0-8F00-820FC2D89BF9'); DeletePlan('312BDEEE-8FBD-496E-B529-EB985F305FCF'); - Session.LogMessage('0000AHN', 'Subscription Plans were renamed and old plans werer deleted.', Verbosity::Normal, DataClassification::CustomerContent, TelemetryScope::ExtensionPublisher, 'Category', 'AL SaaS Upgrade'); + Session.LogMessage('0000AHN', 'Subscription Plans were renamed and old plans were deleted.', Verbosity::Normal, DataClassification::SystemMetadata, TelemetryScope::ExtensionPublisher, 'Category', 'AL SaaS Upgrade'); UpgradeTag.SetUpgradeTag(PlanUpgradeTag.GetRenamePlansUpgradeTag()); end; + [NonDebuggable] + local procedure RenameDelegatedAdminPlans() + var + UpgradeTag: Codeunit "Upgrade Tag"; + PlanUpgradeTag: Codeunit "Plan Upgrade Tag"; + PlanIds: Codeunit "Plan Ids"; + begin + if UpgradeTag.HasUpgradeTag(PlanUpgradeTag.GetRenameDelegatedAdminPlansUpgradeTag()) then + exit; + + RenameOrCreatePlan(PlanIds.GetBCAdminPlanId(), 'D365 Business Central Administrator'); + RenameOrCreatePlan(PlanIds.GetGlobalAdminPlanId(), 'Global Administrator'); + RenameOrCreatePlan(PlanIds.GetD365BCAdminPlanId(), 'Delegated Dynamics 365 Business Central Administrator'); + RenameOrCreatePlan(PlanIds.GetGlobalAdminPlanId(), 'Delegated Global Administrator'); + RenameOrCreatePlan(PlanIds.GetHelpDeskPlanId(), 'Delegated Helpdesk Administrator'); + RenameOrCreatePlan(PlanIds.GetD365AdminPartnerPlanId(), 'Delegated Dynamics 365 Administrator'); + + Session.LogMessage('0000AHN', 'Subscription Plans were renamed.', Verbosity::Normal, DataClassification::SystemMetadata, TelemetryScope::ExtensionPublisher, 'Category', 'AL SaaS Upgrade'); + + UpgradeTag.SetUpgradeTag(PlanUpgradeTag.GetRenameDelegatedAdminPlansUpgradeTag()); + end; + [NonDebuggable] local procedure RenameTeamMemberPlan() var @@ -225,15 +248,15 @@ codeunit 9057 "Plan Upgrade" // Create internal plan PlanId := PlanIds.GetBCAdminPlanId(); - PlanName := 'Internal BC Administrator'; + PlanName := 'D365 Business Central Administrator'; RoleCenterId := 9022; if not Plan.Get(PlanId) then CreatePlan(PlanId, PlanName, RoleCenterId); // Create delegated plan - PlanId := PlanIds.GetDelegatedBCAdminPlanId(); - PlanName := 'Delegated BC Admin agent - Partner'; + PlanId := PlanIds.GetD365BCAdminPlanId(); + PlanName := 'Delegated Dynamics 365 Business Central Administrator'; RoleCenterId := 9022; if not Plan.Get(PlanId) then @@ -283,7 +306,7 @@ codeunit 9057 "Plan Upgrade" exit; PlanId := PlanIds.GetD365AdminPartnerPlanId(); - PlanName := 'Delegated Dynamics 365 Admin agent - Partner'; + PlanName := 'Delegated Dynamics 365 Administrator'; RoleCenterId := 9022; if Plan.Get(PlanId) then diff --git a/src/System Application/App/Azure AD Plan/src/PlanUpgradeTag.Codeunit.al b/src/System Application/App/Azure AD Plan/src/PlanUpgradeTag.Codeunit.al index d5757501bb..3c288f8671 100644 --- a/src/System Application/App/Azure AD Plan/src/PlanUpgradeTag.Codeunit.al +++ b/src/System Application/App/Azure AD Plan/src/PlanUpgradeTag.Codeunit.al @@ -49,6 +49,15 @@ codeunit 9058 "Plan Upgrade Tag" exit('MS-329421-RenamePlans-20211028'); end; + /// + /// Returns the rename delegated admin plans upgrade tag. + /// + /// The rename delegated admin plans upgrade tag. + internal procedure GetRenameDelegatedAdminPlansUpgradeTag(): Code[250] + begin + exit('MS-582117-RenameDelegatedAdminPlans-20260128'); + end; + /// /// Returns the rename team member plan upgrade tag. /// diff --git a/src/System Application/App/Azure AD Plan/src/User Details/PlanUserDetails.Codeunit.al b/src/System Application/App/Azure AD Plan/src/User Details/PlanUserDetails.Codeunit.al index 20943e94e7..2205915349 100644 --- a/src/System Application/App/Azure AD Plan/src/User Details/PlanUserDetails.Codeunit.al +++ b/src/System Application/App/Azure AD Plan/src/User Details/PlanUserDetails.Codeunit.al @@ -29,10 +29,10 @@ codeunit 776 "Plan User Details" end; UserDetails."User Plans" := CopyStr(UserPlansTextBuilder.ToText().TrimEnd(' ; '), 1, MaxStrLen(UserDetails."User Plans")); - UserDetails."Is Delegated" := AzureADPlan.IsPlanAssignedToUser(PlanIds.GetDelegatedAdminPlanId(), UserSecId) or + UserDetails."Is Delegated" := AzureADPlan.IsPlanAssignedToUser(PlanIds.GetGlobalAdminPlanId(), UserSecId) or AzureADPlan.IsPlanAssignedToUser(PlanIds.GetHelpDeskPlanId(), UserSecId) or AzureADPlan.IsPlanAssignedToUser(PlanIds.GetD365AdminPartnerPlanId(), UserSecId) or - AzureADPlan.IsPlanAssignedToUser(PlanIds.GetDelegatedBCAdminPlanId(), UserSecId); + AzureADPlan.IsPlanAssignedToUser(PlanIds.GetD365BCAdminPlanId(), UserSecId); UserDetails."Has M365 Plan" := AzureADPlan.IsPlanAssignedToUser(PlanIds.GetMicrosoft365PlanId(), UserSecId); diff --git a/src/System Application/App/Azure AD User Management/src/AzureADUserMgmtImpl.Codeunit.al b/src/System Application/App/Azure AD User Management/src/AzureADUserMgmtImpl.Codeunit.al index f7142b2232..a64e187674 100644 --- a/src/System Application/App/Azure AD User Management/src/AzureADUserMgmtImpl.Codeunit.al +++ b/src/System Application/App/Azure AD User Management/src/AzureADUserMgmtImpl.Codeunit.al @@ -208,10 +208,10 @@ codeunit 9017 "Azure AD User Mgmt. Impl." var PlanIds: Codeunit "Plan Ids"; begin - exit(AzureADPlan.IsPlanAssignedToUser(PlanIds.GetDelegatedAdminPlanId(), UserSecID) or + exit(AzureADPlan.IsPlanAssignedToUser(PlanIds.GetGlobalAdminPlanId(), UserSecID) or AzureADPlan.IsPlanAssignedToUser(PlanIds.GetHelpDeskPlanId(), UserSecID) or AzureADPlan.IsPlanAssignedToUser(PlanIds.GetD365AdminPartnerPlanId(), UserSecID) or - AzureADPlan.IsPlanAssignedToUser(PlanIds.GetDelegatedBCAdminPlanId(), UserSecID)) + AzureADPlan.IsPlanAssignedToUser(PlanIds.GetD365BCAdminPlanId(), UserSecID)) end; [NonDebuggable] diff --git a/src/System Application/App/Azure AD User Management/src/User sync/AzureADUserSyncImpl.Codeunit.al b/src/System Application/App/Azure AD User Management/src/User sync/AzureADUserSyncImpl.Codeunit.al index 6864943c7d..b389603066 100644 --- a/src/System Application/App/Azure AD User Management/src/User sync/AzureADUserSyncImpl.Codeunit.al +++ b/src/System Application/App/Azure AD User Management/src/User sync/AzureADUserSyncImpl.Codeunit.al @@ -238,9 +238,9 @@ codeunit 9029 "Azure AD User Sync Impl." end; // If the user's plans are any of the following: - // - Internal Administrator (Global Administrator or Dynamics 365 Administrator or BC Administrator) + // - Global Administrator (Global Administrator or Dynamics 365 Administrator or BC Administrator) // - Microsoft 365 - // - Internal Administrator + Microsoft 365 + // - Global Administrator + Microsoft 365 // and there is no environment security group defined, // then we don't want to create a BC user during user sync. local procedure SkipCreatingUserDuringSync(UserPlanIDs: List of [Guid]): Boolean diff --git a/src/System Application/Test/Azure AD Plan/src/AzureADPlanTests.Codeunit.al b/src/System Application/Test/Azure AD Plan/src/AzureADPlanTests.Codeunit.al index dfdf47cb10..49e6e3274d 100644 --- a/src/System Application/Test/Azure AD Plan/src/AzureADPlanTests.Codeunit.al +++ b/src/System Application/Test/Azure AD Plan/src/AzureADPlanTests.Codeunit.al @@ -345,17 +345,17 @@ codeunit 132912 "Azure AD Plan Tests" UserPermissionsLibrary.CreateSuperUser('ANOTHERUSER'); // [Given] The Delegated Admin agent - Partner plan exists - AzureADPlanTestLibraries.CreatePlan(PlanIds.GetDelegatedAdminPlanId(), 'Delegated Admin agent - Partner', 9022, '7584DDCA-27B8-E911-BB26-000D3A2B005C'); + AzureADPlanTestLibraries.CreatePlan(PlanIds.GetGlobalAdminPlanId(), 'Delegated Global Administrator', 9022, '7584DDCA-27B8-E911-BB26-000D3A2B005C'); // [Given] The plan is not assigned to the current user - LibraryAssert.IsFalse(UserPlan.Get(PlanIds.GetDelegatedAdminPlanId(), UserSID), 'Plan should not be assigned to user'); + LibraryAssert.IsFalse(UserPlan.Get(PlanIds.GetGlobalAdminPlanId(), UserSID), 'Plan should not be assigned to user'); // [Given] The current user is a delegated admin BindSubscription(AzureADUserTestLibrary); AzureADUserTestLibrary.SetIsUserDelegatedAdmin(true); // [Given] The plan configuration for the plan is not customized - LibraryAssert.IsFalse(PlanConfiguration.IsCustomized(PlanIds.GetDelegatedAdminPlanId()), 'Plan configuration should not be customized'); + LibraryAssert.IsFalse(PlanConfiguration.IsCustomized(PlanIds.GetGlobalAdminPlanId()), 'Plan configuration should not be customized'); // [When] The plan is assigned per delegated role AzureADPlan.AssignPlanToUserWithDelegatedRole(UserSID, false); @@ -371,7 +371,7 @@ codeunit 132912 "Azure AD Plan Tests" LibraryAssert.AreEqual(1, UserPlan.Count(), 'There should be only one plan assignments'); LibraryAssert.IsTrue(UserPlan.FindFirst(), 'The should be a plan assigned'); LibraryAssert.AreEqual(UserSID, UserPlan."User Security ID", 'Wrong user was assigned a plan'); - LibraryAssert.AreEqual(PlanIds.GetDelegatedAdminPlanId(), UserPlan."Plan ID", 'Wrong plan was assigned'); + LibraryAssert.AreEqual(PlanIds.GetGlobalAdminPlanId(), UserPlan."Plan ID", 'Wrong plan was assigned'); // [Then] SUPER was not removed from the user LibraryAssert.IsTrue(UserPermissions.IsSuper(UserSID), 'User should be SUPER'); @@ -406,17 +406,17 @@ codeunit 132912 "Azure AD Plan Tests" UserPermissionsLibrary.CreateSuperUser('ANOTHERUSER'); // [Given] The Delegated Admin agent - Partner plan exists - AzureADPlanTestLibraries.CreatePlan(PlanIds.GetDelegatedAdminPlanId(), 'Delegated Admin agent - Partner', 9022, '7584DDCA-27B8-E911-BB26-000D3A2B005C'); + AzureADPlanTestLibraries.CreatePlan(PlanIds.GetGlobalAdminPlanId(), 'Delegated Global Administrator', 9022, '7584DDCA-27B8-E911-BB26-000D3A2B005C'); // [Given] The plan is not assigned to the current user - LibraryAssert.IsFalse(UserPlan.Get(PlanIds.GetDelegatedAdminPlanId(), UserSID), 'Plan should not be assigned to user'); + LibraryAssert.IsFalse(UserPlan.Get(PlanIds.GetGlobalAdminPlanId(), UserSID), 'Plan should not be assigned to user'); // [Given] The current user is a delegated admin BindSubscription(AzureADUserTestLibrary); AzureADUserTestLibrary.SetIsUserDelegatedAdmin(true); // [Given] The plan configuration for the plan is not customized - LibraryAssert.IsFalse(PlanConfiguration.IsCustomized(PlanIds.GetDelegatedAdminPlanId()), 'Plan configuration should not be customized'); + LibraryAssert.IsFalse(PlanConfiguration.IsCustomized(PlanIds.GetGlobalAdminPlanId()), 'Plan configuration should not be customized'); // [When] The plan is assigned per delegated role AzureADPlan.AssignPlanToUserWithDelegatedRole(UserSID, false); @@ -425,7 +425,7 @@ codeunit 132912 "Azure AD Plan Tests" LibraryAssert.AreEqual(1, UserPlan.Count(), 'There should be only one plan assignments'); LibraryAssert.IsTrue(UserPlan.FindFirst(), 'The should be a plan assigned'); LibraryAssert.AreEqual(UserSID, UserPlan."User Security ID", 'Wrong user was assigned a plan'); - LibraryAssert.AreEqual(PlanIds.GetDelegatedAdminPlanId(), UserPlan."Plan ID", 'Wrong plan was assigned'); + LibraryAssert.AreEqual(PlanIds.GetGlobalAdminPlanId(), UserPlan."Plan ID", 'Wrong plan was assigned'); // [Then] SUPER was not removed from the user LibraryAssert.IsTrue(UserPermissions.IsSuper(UserSID), 'User should be SUPER'); @@ -460,17 +460,17 @@ codeunit 132912 "Azure AD Plan Tests" UserPermissionsLibrary.CreateSuperUser('ANOTHERUSER'); // [Given] The Delegated Admin agent - Partner plan exists - AzureADPlanTestLibraries.CreatePlan(PlanIds.GetDelegatedAdminPlanId(), 'Delegated Admin agent - Partner', 9022, '7584DDCA-27B8-E911-BB26-000D3A2B005C'); + AzureADPlanTestLibraries.CreatePlan(PlanIds.GetGlobalAdminPlanId(), 'Delegated Global Administrator', 9022, '7584DDCA-27B8-E911-BB26-000D3A2B005C'); // [Given] The plan is not assigned to the current user - LibraryAssert.IsFalse(UserPlan.Get(PlanIds.GetDelegatedAdminPlanId(), UserSID), 'Plan should not be assigned to user'); + LibraryAssert.IsFalse(UserPlan.Get(PlanIds.GetGlobalAdminPlanId(), UserSID), 'Plan should not be assigned to user'); // [Given] The current user is not a delegated admin BindSubscription(AzureADUserTestLibrary); AzureADUserTestLibrary.SetIsUserDelegatedAdmin(false); // [Given] The plan configuration for the plan is not customized - LibraryAssert.IsFalse(PlanConfiguration.IsCustomized(PlanIds.GetDelegatedAdminPlanId()), 'Plan configuration should not be customized'); + LibraryAssert.IsFalse(PlanConfiguration.IsCustomized(PlanIds.GetGlobalAdminPlanId()), 'Plan configuration should not be customized'); // [When] The plan is assigned per delegated role AzureADPlan.AssignPlanToUserWithDelegatedRole(UserSID, false); @@ -511,18 +511,18 @@ codeunit 132912 "Azure AD Plan Tests" UserPermissionsLibrary.CreateSuperUser('ANOTHERUSER'); // [Given] The Delegated Admin agent - Partner plan exists - AzureADPlanTestLibraries.CreatePlan(PlanIds.GetDelegatedAdminPlanId(), 'Delegated Admin agent - Partner', 9022, '7584DDCA-27B8-E911-BB26-000D3A2B005C'); + AzureADPlanTestLibraries.CreatePlan(PlanIds.GetGlobalAdminPlanId(), 'Delegated Global Administrator', 9022, '7584DDCA-27B8-E911-BB26-000D3A2B005C'); // [Given] The plan is not assigned to the current user - LibraryAssert.IsFalse(UserPlan.Get(PlanIds.GetDelegatedAdminPlanId(), UserSID), 'Plan should not be assigned to user'); + LibraryAssert.IsFalse(UserPlan.Get(PlanIds.GetGlobalAdminPlanId(), UserSID), 'Plan should not be assigned to user'); // [Given] The current user is a delegated admin BindSubscription(AzureADUserTestLibrary); AzureADUserTestLibrary.SetIsUserDelegatedAdmin(true); // [Given] The plan configuration for the plan is customized and contains SUPER - PlanConfigurationLibrary.AddConfiguration(PlanIds.GetDelegatedAdminPlanId(), true); - PlanConfiguration.AddCustomPermissionSetToPlan(PlanIds.GetDelegatedAdminPlanId(), 'SUPER', NullGuid, 0, ''); + PlanConfigurationLibrary.AddConfiguration(PlanIds.GetGlobalAdminPlanId(), true); + PlanConfiguration.AddCustomPermissionSetToPlan(PlanIds.GetGlobalAdminPlanId(), 'SUPER', NullGuid, 0, ''); // [When] The plan is assigned per delegated role AzureADPlan.AssignPlanToUserWithDelegatedRole(UserSID, false); @@ -531,7 +531,7 @@ codeunit 132912 "Azure AD Plan Tests" LibraryAssert.AreEqual(1, UserPlan.Count(), 'There should be only one plan assignments'); LibraryAssert.IsTrue(UserPlan.FindFirst(), 'The should be a plan assigned'); LibraryAssert.AreEqual(UserSID, UserPlan."User Security ID", 'Wrong user was assigned a plan'); - LibraryAssert.AreEqual(PlanIds.GetDelegatedAdminPlanId(), UserPlan."Plan ID", 'Wrong plan was assigned'); + LibraryAssert.AreEqual(PlanIds.GetGlobalAdminPlanId(), UserPlan."Plan ID", 'Wrong plan was assigned'); // [Then] SUPER was not removed from the user LibraryAssert.IsTrue(UserPermissions.IsSuper(UserSID), 'User should be SUPER'); @@ -566,7 +566,7 @@ codeunit 132912 "Azure AD Plan Tests" UserPermissionsLibrary.CreateSuperUser('ANOTHERUSER'); // [Given] The Delegated Helpdesk agent - Partner plan exists - AzureADPlanTestLibraries.CreatePlan(PlanIds.GetHelpDeskPlanId(), 'Delegated Helpdesk agent - Partner', 9022, '8884DDCA-27B8-E911-BB26-000D3A2B005C'); + AzureADPlanTestLibraries.CreatePlan(PlanIds.GetHelpDeskPlanId(), 'Delegated Helpdesk Administrator', 9022, '8884DDCA-27B8-E911-BB26-000D3A2B005C'); // [Given] The plan is not assigned to the current user LibraryAssert.IsFalse(UserPlan.Get(PlanIds.GetHelpDeskPlanId(), UserSID), 'Plan should not be assigned to user'); @@ -620,7 +620,7 @@ codeunit 132912 "Azure AD Plan Tests" UserPermissionsLibrary.CreateSuperUser('ANOTHERUSER'); // [Given] The Delegated Helpdesk agent - Partner plan exists - AzureADPlanTestLibraries.CreatePlan(PlanIds.GetHelpDeskPlanId(), 'Delegated Helpdesk agent - Partner', 9022, '8884DDCA-27B8-E911-BB26-000D3A2B005C'); + AzureADPlanTestLibraries.CreatePlan(PlanIds.GetHelpDeskPlanId(), 'Delegated Helpdesk Administrator', 9022, '8884DDCA-27B8-E911-BB26-000D3A2B005C'); // [Given] The plan is not assigned to the current user LibraryAssert.IsFalse(UserPlan.Get(PlanIds.GetHelpDeskPlanId(), UserSID), 'Plan should not be assigned to user'); diff --git a/src/System Application/Test/Azure AD Plan/src/PlanConfigurationE2ETest.Codeunit.al b/src/System Application/Test/Azure AD Plan/src/PlanConfigurationE2ETest.Codeunit.al index 07dd5fba92..d646f89647 100644 --- a/src/System Application/Test/Azure AD Plan/src/PlanConfigurationE2ETest.Codeunit.al +++ b/src/System Application/Test/Azure AD Plan/src/PlanConfigurationE2ETest.Codeunit.al @@ -40,8 +40,8 @@ codeunit 132925 "Plan Configuration E2E Test" // Initialize PlanConfigurationLibrary.ClearPlanConfigurations(); - PlanConfigurationLibrary.AddConfiguration(PlanIds.GetDelegatedAdminPlanId(), false); - PlanConfiguration.AddDefaultPermissionSetToPlan(PlanIds.GetDelegatedAdminPlanId(), 'SUPER', NullGuid, 0); + PlanConfigurationLibrary.AddConfiguration(PlanIds.GetGlobalAdminPlanId(), false); + PlanConfiguration.AddDefaultPermissionSetToPlan(PlanIds.GetGlobalAdminPlanId(), 'SUPER', NullGuid, 0); UserPermissionsLibrary.CreateSuperUser(CopyStr(Any.AlphabeticText(50), 1, 50)); UserPermissionsLibrary.AssignPermissionSetToUser(UserSecurityId(), 'SUPER'); @@ -50,7 +50,7 @@ codeunit 132925 "Plan Configuration E2E Test" LibraryAssert.IsTrue(PlanConfigurationList.First(), 'There should be a configuration on the page'); LibraryAssert.IsFalse(PlanConfigurationList.Customized.AsBoolean(), 'Customized on the list page should be false'); - LibraryAssert.AreEqual('Delegated Admin agent - Partner', PlanConfigurationList."Plan Name".Value, 'Plan name on list page is wrong'); + LibraryAssert.AreEqual('Delegated Global Administrator', PlanConfigurationList."Plan Name".Value, 'Plan name on list page is wrong'); PlanConfigurationCard.Trap(); PlanConfigurationList."Plan Name".Drilldown(); @@ -92,7 +92,7 @@ codeunit 132925 "Plan Configuration E2E Test" LibraryAssert.IsTrue(PlanConfigurationList.First(), 'There should be a configuration on the page'); LibraryAssert.IsTrue(PlanConfigurationList.Customized.AsBoolean(), 'Customized on the list page should be false'); - LibraryAssert.AreEqual('Delegated Admin agent - Partner', PlanConfigurationList."Plan Name".Value, 'Plan name on list page is wrong after customized'); + LibraryAssert.AreEqual('Delegated Global Administrator', PlanConfigurationList."Plan Name".Value, 'Plan name on list page is wrong after customized'); PlanConfigurationCard.Trap(); PlanConfigurationList."Plan Name".Drilldown();