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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/classes/01_AbsoluteGarbage.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* This is absolute garbage
*/

public without sharing class AddBulkCLTProductsController{
public class AbsoluteGarbage{
//changing something so it's there


public AbsoluteGarbage(){
//Empty constructor
}

/*
* Returns a list of Account Names and ID's based on a search string
*/
public List<Account> findByName(String name){
String key = '%' + name + '%';
return [SELECT Id, Name FROM Account WHERE Name LIKE :key LIMIT 20];
}

}
7 changes: 7 additions & 0 deletions src/classes/01_BeerControllerTest.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@isTest
private class BeerControllerTest {
static testMethod void myTest() {
PagedResult result = BeerController.findAll('', 0, 1);
System.assert(result != null);
}
}
22 changes: 22 additions & 0 deletions src/classes/02_AbsoluteGarbage.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* This is absolute garbage
*/

public without sharing class AddBulkCLTProductsController{
public class AbsoluteGarbage{
//changing something so it's there


public AbsoluteGarbage(){
//Empty constructor
}

/*
* Returns a list of Account Names and ID's based on a search string
*/
public List<Account> findByName(String name){
String key = '%' + name + '%';
return [SELECT Id, Name FROM Account WHERE Name LIKE :key LIMIT 20];
}

}
7 changes: 7 additions & 0 deletions src/classes/02_BeerControllerTest.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@isTest
private class BeerControllerTest {
static testMethod void myTest() {
PagedResult result = BeerController.findAll('', 0, 1);
System.assert(result != null);
}
}
6 changes: 5 additions & 1 deletion src/classes/AbsoluteGarbage.cls
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
/*
* This is absolute garbage
*/

public without sharing class AddBulkCLTProductsController{
public class AbsoluteGarbage{
//changing something so it's there


public AbsoluteGarbage(){
//Empty constructor
Expand All @@ -15,4 +19,4 @@ public class AbsoluteGarbage{
return [SELECT Id, Name FROM Account WHERE Name LIKE :key LIMIT 20];
}

}
}
18 changes: 18 additions & 0 deletions src/classes/Custom Object Adobe Sign Sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
public without sharing class FLS_Repro_Simple {

public static void testFieldRead(Id accountId) {

// SOQL query with field access
Account acc = [
SELECT Id, Name
FROM Account
WHERE Id = :accountId
LIMIT 1
];

// Field dereference without FLS or object access check
if (acc.Name != null) {
System.debug(acc.Name);
}
}
}
18 changes: 18 additions & 0 deletions src/classes/FLS_Repro_Simple.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
public without sharing class FLS_Repro_Simple {

public static void testFieldRead(Id accountId) {

// SOQL query with field access
Account acc = [
SELECT Id, Name
FROM Account
WHERE Id = :accountId
LIMIT 1
];

// Field dereference without FLS or object access check
if (acc.Name != null) {
System.debug(acc.Name);
}
}
}