locked
Adding claims for another domain user in search results RRS feed

  • Question


  • domain A user have no permission on the file share which is in different domainB.  Sharepoint and File share both in domain B. User login through the domain A using single sign on and one-way trust only.

    Now I need to show file share results of domain B users to domain A users. Means user login as domain A but results should come as per permission of domainB.

    I tried custom pre security trimming also but its not working. What I need to pass actually in pre-trimming AddAccess method. I tried below code from msdn but not confirm what to pass as member in this while adding claims.

     public IEnumerable<Tuple<Claim, bool>> AddAccess(IDictionary<string, object> sessionProperties, IIdentity userIdentity)
        {
    
            if (null == userIdentity)
            {
                throw new NullReferenceException("Error: AxdAccess method is called with an invalid user identity parameter");
            }
    
            RefreshDataFile();
            var claims = new LinkedList<Tuple<Claim, bool>>();
            var membership = GetMembership(GetUserId(userIdentity));
            if (membership != null)
            {
                foreach (var member in membership)
                {
                    claims.AddLast(new Tuple<Claim, bool>(new Claim(_claimType, member, _claimValueType, _claimIssuer, _claimIssuer), false));
                }
            }
    
            return claims;
        }


    Thursday, June 11, 2015 12:39 PM