Пример #1
0
        /// <summary>
        /// Try to get the Acl in the dictionary and return null if the Acl is not found.
        /// </summary>
        /// <param name="p_AclUrl">The url of the Acl to get</param>
        /// <returns>The asked Acl</returns>
        private GsaFeedAcl GetAclInDictionary(string p_AclUrl)
        {
            GsaFeedAcl acl = null;

            if (p_AclUrl != null)
            {
                aclInheritanceDictionary.TryGetValue(p_AclUrl, out acl);
            }
            return(acl);
        }
Пример #2
0
        private GsaFeedAcl ConstructAclInheritance(GsaFeedAcl acl)
        {
            /*
             * Note: If a per-URL ACL inherits from a non-existent URL, or inherits from a URL that does not have a per-URL ACL,
             * the authorization decision is always INDETERMINATE because of the broken inheritance chain.
             * https://www.google.com/support/enterprise/static/gsa/docs/admin/72/gsa_doc_set/feedsguide/feedsguide.html#1084377
             */
            //we try to get the parent acl to construct the inheritance later on.
            acl.ParentAcl = GetAclInDictionary(acl.InheritFrom);

            aclInheritanceDictionary[acl.DocumentUrl] = acl;
            return(acl);
        }