I have a number of documents that have a mix of values set for requires authentication. Is there an easy way to select those that have requires authentication set to
1) false
or
2) inherits and a parent somewhere up the tree that is set to false
The code below only selects case 1.
If it is set to inherits, do I need to loop through each node's parents to see which has a value specified? That could be expensive...
// Create an instance of the Tree provider
var tree = new TreeProvider(CMSContext.CurrentUser);
// Set the parameters for getting documents
var siteName = CMSContext.CurrentSiteName;
const string aliasPath = "/%";
var culture = SettingsKeyProvider.GetStringValue(CMSContext.CurrentSiteName
+ ".CMSDefaultCultureCode");
// Get data set with documents
using (DataSet documents = tree.SelectNodes(siteName, aliasPath, culture, true, null, "[IsSecuredNode] = 1"))
{
}