public bool Validate(OrganizationServiceContext context, CrmSiteMapNode node)
        {
            var propertyValue = node.Entity.GetAttributeValue <bool?>("adx_hiddenfromsitemap");

            if (propertyValue == null)
            {
                return(true);
            }

            return(!propertyValue.GetValueOrDefault());
        }
        public bool Validate(OrganizationServiceContext context, CrmSiteMapNode node)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            if (node == null || node.Entity == null)
            {
                return(false);
            }

            var entity = context.MergeClone(node.Entity);

            return(_securityProvider.TryAssert(context, entity, CrmEntityRight.Read));
        }
예제 #3
0
 public bool Validate(OrganizationServiceContext context, CrmSiteMapNode node)
 {
     return(true);
 }
 protected CrmSiteMapNode ReturnNodeIfAccessible(CrmSiteMapNode node, Func <CrmSiteMapNode> getFallbackNode)
 {
     return(node != null && node.IsAccessibleToUser(HttpContext.Current) ? node : getFallbackNode());
 }
 public bool Validate(OrganizationServiceContext context, CrmSiteMapNode node)
 {
     return(_validators.All(validator => validator.Validate(context, node)));
 }