PrivilegedActor works, but requires a stack search to detect its existence, and must be carefully guarded to prevent misuse.
Using a ThreadLocal flag to determine when we are within a check would be more efficient and likely safer. WildFly security manager does this.