public bool TryAssert(OrganizationServiceContext serviceContext, WebsiteRight right)
        {
            return(this.ContentMapProvider.Using(map =>
            {
                WebsiteNode site;
                Func <WebsiteAccessNode, bool?> selectFlag;

                return map.TryGetValue(_website, out site) &&
                RightMappings.TryGetValue(right, out selectFlag) &&
                TryAssertRightProperty(site, selectFlag);
            }));
        }
        /// <summary> The try assert. </summary>
        /// <param name="serviceContext"> The service context. </param>
        /// <param name="right"> The right. </param>
        /// <returns> The <see cref="bool"/>. </returns>
        public bool TryAssert(OrganizationServiceContext serviceContext, WebsiteRight right)
        {
            var httpContext = HttpContext.Current;

            if (httpContext == null)
            {
                return(_underlyingProvider.TryAssert(serviceContext, right));
            }

            var cacheKey = "{0}:{1}:{2}".FormatWith(GetType().FullName, _website.Id, right);

            var cachedValue = httpContext.Items[cacheKey];

            if (cachedValue is bool)
            {
                return((bool)cachedValue);
            }

            var value = _underlyingProvider.TryAssert(serviceContext, right);

            httpContext.Items[cacheKey] = value;

            return(value);
        }