Add stripInaccessibleFields method to the domain.
This commit is contained in:
@@ -286,6 +286,26 @@ public virtual class fflib_SObjects2
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Trip the records from fields that the user doesn't have access to
|
||||||
|
*/
|
||||||
|
public virtual List<SObject> stripInaccessibleFields()
|
||||||
|
{
|
||||||
|
return stripInaccessibleFields(AccessType.READABLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param accessType
|
||||||
|
*
|
||||||
|
* @return Trip the records from fields that the user doesn't have access to
|
||||||
|
*/
|
||||||
|
public virtual List<SObject> stripInaccessibleFields(
|
||||||
|
System.AccessType accessType
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return Security.stripInaccessible(accessType, getRecords()).getRecords();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param sObjectField The Schema.SObjectField to get their Id values
|
* @param sObjectField The Schema.SObjectField to get their Id values
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user