Skip to content

Commit 397fa35

Browse files
Merge pull request #392 from foxysolutions/feature/fflib_SObjectDomain_UndeleteCorrection
Correction on fflib_SObjectDomain for Undelete handler
2 parents 15590ee + fae59b8 commit 397fa35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sfdx-source/apex-common/main/classes/fflib_SObjectDomain.cls

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ public virtual with sharing class fflib_SObjectDomain
269269
**/
270270
public virtual void handleAfterUndelete()
271271
{
272-
if(Configuration.EnforcingTriggerCRUDSecurity && !SObjectDescribe.isCreateable())
273-
throw new DomainException('Permission to create an ' + SObjectDescribe.getName() + ' denied.');
272+
if(Configuration.EnforcingTriggerCRUDSecurity && !SObjectDescribe.isUndeletable())
273+
throw new DomainException('Permission to undelete an ' + SObjectDescribe.getName() + ' denied.');
274274

275275
onAfterUndelete();
276276
}

0 commit comments

Comments
 (0)