6
votes
5answers
1k views

How to detect if my code is running inside SPSecurity.RunWithElevatedPrivileges

Is there a way to detect if my code is running inside SPSecurity.RunWithElevatedPrivileges? class Foo { public static void Bar() { if (CODE_RUNS_ELEVATED) { Debug.WriteLine("You ...