-
-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Updated all metadata from API v55.0 (Summer '22 release) to v56.0 (Winter '23 release) * Updated LogBatchPurgeScheduler and LogBatchPurger to increase the default batch size from 200 to 2,000, and to handle null batch sizes * Cleaned up some more code in LogBatchPurger & LogBatchPurgeScheduler to centralize the default batch size value to be in just LogBatchPurger (instead of having it hardcoded in both classes) * Changed visibility of some methods in Logger & LogEntryEventBuilder from public to global so they're available in the managed package * Updated the LogEntry__c fields shown on the LoggerScenario__c page's related list * Removed picklist value 'v55.0' in some picklist value fields * Added Description__c text to several new LoggerParameter__mdt records that were released in v4.8.4 and added a pipeline script to ensure this isn't missed in the future * Updated some references to System classes Limits, Network, Security, and Type to include the System namespace - also added placeholder classes in extra-tests to ensure all new references include the System namespace * Added default Apex classes generated when creating/deploying an Experience Site to help with automated testing * Moved LogBatchPurgeController_Tests to the correct test class folder * Added unpackagedMetadata info in sfdx-project.json * Updated package.json & package-lock.json to resolve some dependabot alerts
- Loading branch information
Showing
271 changed files
with
24,720 additions
and
20,684 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
.sf/ | ||
.sfdx/ | ||
.vscode/ | ||
scripts/ | ||
test-coverage/ | ||
|
||
# NPM | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
config/experience-cloud/classes/ChangePasswordController.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* An apex page controller that exposes the change password functionality | ||
*/ | ||
public with sharing class ChangePasswordController { | ||
public String oldPassword { get; set; } | ||
public String newPassword { get; set; } | ||
public String verifyNewPassword { get; set; } | ||
|
||
public PageReference changePassword() { | ||
return Site.changePassword(newPassword, verifyNewPassword, oldpassword); | ||
} | ||
|
||
public ChangePasswordController() { | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
config/experience-cloud/classes/ChangePasswordController.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>56.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
16 changes: 16 additions & 0 deletions
16
config/experience-cloud/classes/ChangePasswordControllerTest.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* An apex page controller that exposes the change password functionality | ||
*/ | ||
@IsTest | ||
public with sharing class ChangePasswordControllerTest { | ||
@IsTest(SeeAllData=true) | ||
public static void testChangePasswordController() { | ||
// Instantiate a new controller with all parameters in the page | ||
ChangePasswordController controller = new ChangePasswordController(); | ||
controller.oldPassword = '123456'; | ||
controller.newPassword = 'qwerty1'; | ||
controller.verifyNewPassword = 'qwerty1'; | ||
|
||
System.assertEquals(controller.changePassword(), null); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
config/experience-cloud/classes/ChangePasswordControllerTest.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>56.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
20 changes: 20 additions & 0 deletions
20
config/experience-cloud/classes/ForgotPasswordController.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* An apex page controller that exposes the site forgot password functionality | ||
*/ | ||
public with sharing class ForgotPasswordController { | ||
public String username { get; set; } | ||
|
||
public ForgotPasswordController() { | ||
} | ||
|
||
public PageReference forgotPassword() { | ||
boolean success = Site.forgotPassword(username); | ||
PageReference pr = Page.ForgotPasswordConfirm; | ||
pr.setRedirect(true); | ||
|
||
if (success) { | ||
return pr; | ||
} | ||
return null; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
config/experience-cloud/classes/ForgotPasswordController.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>56.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
14 changes: 14 additions & 0 deletions
14
config/experience-cloud/classes/ForgotPasswordControllerTest.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* An apex page controller that exposes the site forgot password functionality | ||
*/ | ||
@IsTest | ||
public with sharing class ForgotPasswordControllerTest { | ||
@IsTest(SeeAllData=true) | ||
public static void testForgotPasswordController() { | ||
// Instantiate a new controller with all parameters in the page | ||
ForgotPasswordController controller = new ForgotPasswordController(); | ||
controller.username = 'test@salesforce.com'; | ||
|
||
System.assertEquals(controller.forgotPassword(), null); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
config/experience-cloud/classes/ForgotPasswordControllerTest.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>56.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
62 changes: 62 additions & 0 deletions
62
config/experience-cloud/classes/MicrobatchSelfRegController.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
public class MicrobatchSelfRegController { | ||
public String firstName { get; set; } | ||
public String lastName { get; set; } | ||
public String email { get; set; } | ||
public String communityNickname { | ||
get; | ||
set { | ||
communityNickname = value == null ? value : value.trim(); | ||
} | ||
} | ||
|
||
public MicrobatchSelfRegController() { | ||
String expid = ApexPages.currentPage().getParameters().get('expid'); | ||
if (expId != null) { | ||
Site.setExperienceId(expId); | ||
} | ||
} | ||
|
||
public PageReference registerUser() { | ||
String userName = email; | ||
String accountName; // to be filled by customer | ||
String contactName; //to be filled by customer | ||
String profileId = null; //to be filled by customer | ||
String UUID; | ||
|
||
User u = new User(); | ||
u.Username = userName; | ||
u.Email = email; | ||
u.FirstName = firstName; | ||
u.LastName = lastName; | ||
u.CommunityNickname = communityNickname; | ||
u.ProfileId = profileId; | ||
u.LocaleSidKey = 'en_US'; | ||
u.TimeZoneSidKey = 'GMT'; | ||
u.LanguageLocaleKey = 'en_US'; | ||
u.EmailEncodingKey = 'UTF-8'; | ||
|
||
Account acc = new Account(); | ||
acc.Name = 'Account for ' + lastName; | ||
Contact c = new Contact(); | ||
c.lastName = lastName; | ||
|
||
try { | ||
UUID = System.Network.createExternalUserAsync(u, c, acc); | ||
} catch (Site.ExternalUserCreateException ex) { | ||
List<String> errors = ex.getDisplayMessages(); | ||
for (String error : errors) { | ||
ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, error)); | ||
} | ||
|
||
// This message is used for debugging. Do not display this in the UI to the end user. | ||
// It has the information around why the user creation failed. | ||
System.debug(ex.getMessage()); | ||
} | ||
if (UUID != null) { | ||
PageReference page = System.Page.CommunitiesSelfRegConfirm; | ||
page.setRedirect(true); | ||
return page; | ||
} | ||
return null; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
config/experience-cloud/classes/MicrobatchSelfRegController.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>56.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
14 changes: 14 additions & 0 deletions
14
config/experience-cloud/classes/MicrobatchSelfRegControllerTest.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
@IsTest | ||
public with sharing class MicrobatchSelfRegControllerTest { | ||
@IsTest(SeeAllData=true) | ||
public static void testMicrobatchSelfRegController() { | ||
MicrobatchSelfRegController controller = new MicrobatchSelfRegController(); | ||
controller.firstName = 'FirstName'; | ||
controller.lastName = 'LastName'; | ||
controller.email = 'test@force.com'; | ||
controller.communityNickname = 'test'; | ||
|
||
// registerUser will always return null when the page isn't accessed as a guest user | ||
System.assert(controller.registerUser() == null); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
config/experience-cloud/classes/MicrobatchSelfRegControllerTest.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>56.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
95 changes: 95 additions & 0 deletions
95
config/experience-cloud/classes/MyProfilePageController.cls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
/** | ||
* An apex class that updates portal user details. | ||
Guest users are never able to access this page. | ||
*/ | ||
public with sharing class MyProfilePageController { | ||
private User user; | ||
private boolean isEdit = false; | ||
|
||
public User getUser() { | ||
return user; | ||
} | ||
|
||
public MyProfilePageController() { | ||
user = [ | ||
SELECT | ||
id, | ||
email, | ||
username, | ||
usertype, | ||
communitynickname, | ||
timezonesidkey, | ||
languagelocalekey, | ||
firstname, | ||
lastname, | ||
phone, | ||
title, | ||
street, | ||
city, | ||
country, | ||
postalcode, | ||
state, | ||
localesidkey, | ||
mobilephone, | ||
extension, | ||
fax, | ||
contact.email | ||
FROM User | ||
WHERE id = :UserInfo.getUserId() | ||
]; | ||
// guest users should never be able to access this page | ||
if (user.usertype == 'GUEST') { | ||
throw new NoAccessException(); | ||
} | ||
} | ||
|
||
public Boolean getIsEdit() { | ||
return isEdit; | ||
} | ||
|
||
public void edit() { | ||
isEdit = true; | ||
} | ||
|
||
public void save() { | ||
try { | ||
update user; | ||
isEdit = false; | ||
} catch (DmlException e) { | ||
ApexPages.addMessages(e); | ||
} | ||
} | ||
|
||
public PageReference changePassword() { | ||
return Page.ChangePassword; | ||
} | ||
|
||
public void cancel() { | ||
isEdit = false; | ||
user = [ | ||
SELECT | ||
id, | ||
email, | ||
username, | ||
communitynickname, | ||
timezonesidkey, | ||
languagelocalekey, | ||
firstname, | ||
lastname, | ||
phone, | ||
title, | ||
street, | ||
city, | ||
country, | ||
postalcode, | ||
state, | ||
localesidkey, | ||
mobilephone, | ||
extension, | ||
fax, | ||
contact.email | ||
FROM User | ||
WHERE id = :UserInfo.getUserId() | ||
]; | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
config/experience-cloud/classes/MyProfilePageController.cls-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>56.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
Oops, something went wrong.