Skip to content

Commit

Permalink
updates for with security enforced (trailheadapps#142)
Browse files Browse the repository at this point in the history
* updates for with security enforced

* Ran Prettier

Co-authored-by: Philippe Ozil <[email protected]>
  • Loading branch information
codefriar and pozil authored Feb 10, 2020
1 parent 6ff7d9d commit 600e832
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions force-app/main/default/classes/ProductController.cls
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public with sharing class ProductController {
result.records = Database.query(
'SELECT Id, Name, MSRP__c, Description__c, Category__c, Level__c, Picture_URL__c, Material__c FROM Product__c ' +
whereClause +
' WITH SECURITY_ENFORCED' +
' ORDER BY Name LIMIT :pageSize OFFSET :offset'
);
return result;
Expand All @@ -77,6 +78,7 @@ public with sharing class ProductController {
Material__c
FROM Product__c
WHERE Product_Family__c = :familyId AND Id != :productId
WITH SECURITY_ENFORCED
];
}
}

0 comments on commit 600e832

Please sign in to comment.