We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Does impersonation in ATF respect or ignore ACL's that do not allow impersonation?

Colin Wilson
Tera Guru

My assumption is yes, but, would like concrete clarification. 

I create a user, and assign it roles to a table in which the ACL's do not allow impersonation sessions to CRUD those records. 

I impersonate that user, and try to create a record. 
Test fails -> Can't find field values on that table. 

In this case - outside of editing the ACL, is there a work around?

 

Thanks,

Colin

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@Colin Wilson 

Yes — ATF impersonation does not bypass ACLs. The impersonated session is still subject to the target user’s access rules, and if that user cannot read/create the record or fields, your test will fail for the same reason a real user would fail

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

1 REPLY 1

Ankur Bawiskar
Tera Patron

@Colin Wilson 

Yes — ATF impersonation does not bypass ACLs. The impersonated session is still subject to the target user’s access rules, and if that user cannot read/create the record or fields, your test will fail for the same reason a real user would fail

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader