We need to show some items to some particular users on our website based on some security roles applied and need to show lock icons to other users. But in code behind we are getting null items, on those security is applied.
We are using below code to get item -
var searchItem = Sitecore.Context.Database.GetItem(itemId);
In above code we checked it by itemId and by item path as well, but still these security applied items are null, so can you please help me how can I get these items in code behind.