Beispiel #1
0
        /// <summary>
        /// Creates an instance of IExecutionContext using the system account. Should
        /// be used sparingly for elevating permissions, typically for back-end processes.
        /// </summary>
        /// <param name="executionContextToCopy">Optional execution context to base the new context on</param>
        public IExecutionContext CreateSystemUserExecutionContext(IExecutionContext executionContextToCopy = null)
        {
            var userContext = _userContextService.GetSystemUserContext();

            return(Create(userContext, executionContextToCopy));
        }