Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@

The most robust observability solution for Salesforce experts. Built 100% natively on the platform, and designed to work seamlessly with Apex, Lightning Components, Flow, OmniStudio, and integrations.

## Unlocked Package - v4.18.4
## Unlocked Package - v4.19.0

[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04tg7000000Bb13AAC)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04tg7000000Bb13AAC)
[![Install Unlocked Package in a Sandbox](./images/btn-install-unlocked-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?p0=04tg7000000EfCzAAK)
[![Install Unlocked Package in Production](./images/btn-install-unlocked-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?p0=04tg7000000EfCzAAK)
[![View Documentation](./images/btn-view-documentation.png)](https://github.com/jongpie/NebulaLogger/wiki)

`sf package install --wait 20 --security-type AdminsOnly --package 04tg7000000Bb13AAC`
`sf package install --wait 20 --security-type AdminsOnly --package 04tg7000000EfCzAAK`

---

## Managed Package - v4.18.0
## Managed Package - v4.19.0

[![Install Managed Package in a Sandbox](./images/btn-install-managed-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?mgd=true&p0=04tg700000086RdAAI)
[![Install Managed Package in Production](./images/btn-install-managed-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?mgd=true&p0=04tg700000086RdAAI)
[![Install Managed Package in a Sandbox](./images/btn-install-managed-package-sandbox.png)](https://test.salesforce.com/packaging/installPackage.apexp?mgd=true&p0=TODO_MGD_PKG)
[![Install Managed Package in Production](./images/btn-install-managed-package-production.png)](https://login.salesforce.com/packaging/installPackage.apexp?mgd=true&p0=TODO_MGD_PKG)
[![View Milestone](./images/btn-view-managed-package-milestone.png)](https://github.com/jongpie/NebulaLogger/milestone/16?closed=1)

`sf package install --wait 30 --security-type AdminsOnly --package 04tg700000086RdAAI`
`sf package install --wait 30 --security-type AdminsOnly --package TODO_MGD_PKG`

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public with sharing class ChangePasswordController {
public String verifyNewPassword { get; set; }

public PageReference changePassword() {
return Site.changePassword(newPassword, verifyNewPassword, oldpassword);
return System.Site.changePassword(newPassword, verifyNewPassword, oldpassword);
}

public ChangePasswordController() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>65.0</apiVersion>
<apiVersion>66.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>65.0</apiVersion>
<apiVersion>66.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* An apex page controller that takes the user to the right start page based on credentials or lack thereof
*/
public with sharing class CommunitiesLandingController {
// Code we will invoke on page load.
public PageReference forwardToStartPage() {
return System.Network.communitiesLanding();
}

public CommunitiesLandingController() {
}
}
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>67.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* An apex page controller that takes the user to the right start page based on credentials or lack thereof
*/
@IsTest
public with sharing class CommunitiesLandingControllerTest {
@IsTest(SeeAllData=true)
public static void testCommunitiesLandingController() {
// Instantiate a new controller with all parameters in the page
CommunitiesLandingController controller = new CommunitiesLandingController();
PageReference pageRef = controller.forwardToStartPage();
//PageRef is either null or an empty object in test context
if (pageRef != null) {
String url = pageRef.getUrl();
if (url != null) {
System.assertEquals(true, String.isEmpty(url));
//show up in perforce
}
}
}
}
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>67.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* An apex page controller that exposes the site login functionality
*/
global with sharing class CommunitiesLoginController {
global CommunitiesLoginController() {
}

// Code we will invoke on page load.
global PageReference forwardToAuthPage() {
String startUrl = System.currentPageReference().getParameters().get('startURL');
String displayType = System.currentPageReference().getParameters().get('display');
return System.Network.forwardToAuthPage(startUrl, displayType);
}
}
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>67.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* An apex page controller that exposes the site login functionality
*/
@IsTest
global with sharing class CommunitiesLoginControllerTest {
@IsTest(SeeAllData=true)
global static void testCommunitiesLoginController() {
CommunitiesLoginController controller = new CommunitiesLoginController();
System.assertEquals(null, controller.forwardToAuthPage());
}
}
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>67.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/**
* An apex page controller that supports self registration of users in communities that allow self registration
*/
public class CommunitiesSelfRegController {
public String firstName { get; set; }
public String lastName { get; set; }
public String email { get; set; }
public String password {
get;
set {
password = value == null ? value : value.trim();
}
}
public String confirmPassword {
get;
set {
confirmPassword = value == null ? value : value.trim();
}
}
public String communityNickname {
get;
set {
communityNickname = value == null ? value : value.trim();
}
}

public CommunitiesSelfRegController() {
String expid = ApexPages.currentPage().getParameters().get('expid');
if (expId != null) {
System.Site.setExperienceId(expId);
}
}

private boolean isValidPassword() {
return password == confirmPassword;
}

public PageReference registerUser() {
// it's okay if password is null - we'll send the user a random password in that case
if (!isValidPassword()) {
ApexPages.Message msg = new ApexPages.Message(ApexPages.Severity.ERROR, Label.site.passwords_dont_match);
ApexPages.addMessage(msg);
return null;
}

String profileId = null; // To be filled in by customer.
String roleEnum = null; // To be filled in by customer.
String accountId = ''; // To be filled in by customer.

String userName = email;

Schema.User u = new Schema.User();
u.Username = userName;
u.Email = email;
u.FirstName = firstName;
u.LastName = lastName;
u.CommunityNickname = communityNickname;
u.ProfileId = profileId;

String userId;

try {
userId = System.Site.createExternalUser(u, accountId, password);
} 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 (userId != null) {
if (password != null && password.length() > 1) {
return System.Site.login(userName, password, ApexPages.currentPage().getParameters().get('startURL'));
} else {
PageReference page = System.Page.CommunitiesSelfRegConfirm;
page.setRedirect(true);
return page;
}
}
return null;
}
}
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>67.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* An apex page controller that supports self registration of users in communities that allow self registration
*/
@IsTest
public with sharing class CommunitiesSelfRegControllerTest {
@IsTest(SeeAllData=true)
public static void testCommunitiesSelfRegController() {
CommunitiesSelfRegController controller = new CommunitiesSelfRegController();
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);

controller.password = 'abcd1234';
controller.confirmPassword = 'abcd123';
System.assert(controller.registerUser() == null);
}
}
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>67.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ global class ExampleRegistrationHandler implements Auth.RegistrationHandler {
}

private static Schema.Profile getCommunityProfile() {
Id siteId = Site.getSiteId();
Id siteId = System.Site.getSiteId();
if (siteId != null) {
Site currentSite = [SELECT GuestUserId FROM Site WHERE Id = :siteId LIMIT 1];
Schema.Site currentSite = [SELECT GuestUserId FROM Site WHERE Id = :siteId LIMIT 1];
if (currentSite.GuestUserId != null) {
Schema.User guestUser = [
SELECT Profile.Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public with sharing class ForgotPasswordController {
}

public PageReference forgotPassword() {
boolean success = Site.forgotPassword(username);
boolean success = System.Site.forgotPassword(username);
PageReference pr = Page.ForgotPasswordConfirm;
pr.setRedirect(true);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>65.0</apiVersion>
<apiVersion>66.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>65.0</apiVersion>
<apiVersion>66.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class MicrobatchSelfRegController {
public MicrobatchSelfRegController() {
String expid = ApexPages.currentPage().getParameters().get('expid');
if (expId != null) {
Site.setExperienceId(expId);
System.Site.setExperienceId(expId);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>65.0</apiVersion>
<apiVersion>66.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>65.0</apiVersion>
<apiVersion>66.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>65.0</apiVersion>
<apiVersion>66.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>65.0</apiVersion>
<apiVersion>66.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ global with sharing class SiteLoginController {

global PageReference login() {
String startUrl = System.currentPageReference().getParameters().get('startURL');
return Site.login(username, password, startUrl);
return System.Site.login(username, password, startUrl);
}

global SiteLoginController() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>65.0</apiVersion>
<apiVersion>66.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>65.0</apiVersion>
<apiVersion>66.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ public with sharing class SiteRegisterController {
String accountId = PORTAL_ACCOUNT_ID;

// lastName is a required field on user, but if it isn't specified, we'll default it to the username
String userId = Site.createPortalUser(u, accountId, password);
String userId = System.Site.createPortalUser(u, accountId, password);
if (userId != null) {
if (password != null && password.length() > 1) {
return Site.login(username, password, null);
return System.Site.login(username, password, null);
} else {
PageReference page = System.Page.SiteRegisterConfirm;
page.setRedirect(true);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>65.0</apiVersion>
<apiVersion>66.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>65.0</apiVersion>
<apiVersion>66.0</apiVersion>
<status>Active</status>
</ApexClass>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>65.0</apiVersion>
<apiVersion>66.0</apiVersion>
<availableInTouch>false</availableInTouch>
<confirmationTokenRequired>false</confirmationTokenRequired>
<description>Página predeterminada de límite superado de Plataforma Lightning</description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexPage xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>65.0</apiVersion>
<apiVersion>66.0</apiVersion>
<availableInTouch>false</availableInTouch>
<confirmationTokenRequired>false</confirmationTokenRequired>
<description>Página de cambio de contraseña predeterminada de Sitios de Salesforce</description>
Expand Down
Loading
Loading