RIP
Tutorial
Tags
Topics
Examples
eBooks
Tutorial by Examples
Disable permission checking when accessing an item
using (new Sitecore.SecurityModel.SecurityDisabler()) { var item = Sitecore.Context.Database.GetItem("/sitecore/content/home"); }
Impersonate a different user when accessing an item
var user = Sitecore.Security.Accounts.User.FromName("sitecore/testname", false); using (new Sitecore.Security.Accounts.UserSwitcher(user)) { var item = Sitecore.Context.Database.GetItem("/sitecore/content/home"); }
Page 1 of 1
1
Cookie
This website stores cookies on your computer.
We use cookies to enhance your experience on our website and deliver personalized content.
For more details on our cookie usage, please review our
Cookie Policy
and
Privacy Policy
Accept all Cookies
Leave this website