As mentioned in this answer on ElevatePrivileges and described in the docs, ElevatePrivileges lets you temporarily elevate the privileges of the current user.
I believe this was meant to let item version history reflect the user a given action was performed "on behalf of." Was that the main use case?
I have questions on the the method.
- Is
ElevatePrivileges
only available in the CoreService? - Any restrictions or gotchas for using it in CM-side code like workflow, event system, or templating?
- Does it only apply in the context of a given CoreService "session?" In other words, would a user connected to the Content Manager be "elevated" outside of code that calls
ElevatePrivileges
(I'm thinking no)? - Is the elevation to a specific user/group or just to an "administrative" level?
- Do the Privileges feature in SDL Web Cloud and Web 8.5 affect
ElevatePrivileges
? - And out of curiosity, what happens if you don't call
RestorePrivileges
after usingElevatePrivileges
?