I have a list of Photo items that I'm trying to get from my Glass Mapper model using the following declaration:
SitecoreField("Photos")]
public virtual IEnumerable<Photo> Photos { get; set; }
This set of photos is always empty when I'm not logged into Sitecore because the photos have Sitecore security on them. When I am logged into Sitecore (for example, in edit or preview mode while signed into the admin account), I can grab the photos just fine. Normally, to disable such security I would use the security disabler:
using (new Sitecore.SecurityModel.SecurityDisabler()){...}
I'm unsure of how to combine the security disabler with Glass Mapper to grab sitecore items that have security enabled. Any ideas on how I can disable this security from my Glass Mapper model? Thanks for the help!