using System.Web.UI.WebControls;
using System.ComponentModel;
using System.Resources;
+using System.Security.Principal;
namespace System.Web {
public class SiteMapNode : IHierarchyData, INavigateUIData, ICloneable {
public virtual SiteMapNodeCollection ChildNodes {
get {
- if (childNodes == null)
+ if (provider.SecurityTrimmingEnabled) {
+ IPrincipal p = HttpContext.Current.User;
+ if ((user == null && user != p) || user != null && user != p) {
+ user = p;
+ childNodes = provider.GetChildNodes (this);
+ }
+ } else if (childNodes == null) {
childNodes = provider.GetChildNodes (this);
+ }
return childNodes;
}
set {
CheckWritable ();
+ user = null;
childNodes = value;
}
}
string resourceKey;
SiteMapNode parent;
SiteMapNodeCollection childNodes;
+ IPrincipal user;
#endregion
}