Skip to content

Track When An Admin Logs In As Another User

Compare
Choose a tag to compare
@jongpie jongpie released this 22 Nov 19:30
· 92 commits to main since this release
81ce8b9

Core Unlocked Package Changes

Closed #396 by adding new fields & logic to determine if the current user (stored in Log__c.LoggedBy__c) is being impersonated by another user

  • Added config & code to track impersonators using the Login As feature - this information is now tracked in the new field LogEntryEvent__e.ImpersonatedById__c and Log__c.ImpersonatedBy__c

    image

  • Added new class LoggerSObjectProxy with inner classes that provide representations of problematic SObject Types AuthSession, LoginHistory and Network. This simplifies some of the downstream code, and makes things easier to test.

  • Fixed an unreported SObjectException that would occur when logging a record ID for a template object, such as CaseComment, CaseHistory, AccountHistory, etc., with the error System.SObjectException: Cannot locate Apex Type for ID

Thanks to @surajp, @bussemac, @jkranz-rk, @jamessimone, and @nojanv for all of the help with this getting this new feature released!