Skip to content

Commit

Permalink
Enforce FLS in Selectors by default
Browse files Browse the repository at this point in the history
Added ability to 'ignoreFls' on Selectors
  • Loading branch information
rob-baillie-ortoo committed Dec 10, 2021
1 parent 84da6ec commit e2be197
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
1 change: 0 additions & 1 deletion TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Look at:
Do we need to add 'emptyRecycleBin' too?

Test Manually:
Implementation os SecureDml in general - does it actually work
Can I create a record that I can't update, even though I generally have rights - what happens?
Can I create a record that I can update, even though I generally don't have rights - what happens?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public abstract with sharing class fflib_SObjectSelector
/**
* Enforce FLS Security
**/
private Boolean m_enforceFLS = false;
protected Boolean m_enforceFLS = false;

/**
* Enforce CRUD Security
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,15 @@
*/
public abstract inherited sharing class ortoo_SobjectSelector extends fflib_SobjectSelector // NOPMD: specified a mini-namespace to differentiate from fflib versions
{
public ortoo_SobjectSelector()
{
super();
enforceFLS();
}

public fflib_SObjectSelector ignoreFls()
{
m_enforceFLS = false;
return this;
}
}

0 comments on commit e2be197

Please sign in to comment.