none
sharepoint 2013 pre-security-trimmer RRS feed

  • 问题


  • I tried to write a Pre-Security-Trimmer according to https://msdn.microsoft.com/en-us/library/ee819923.aspx. But it didn't work.

    I believe that the code could run to AddAccess() method.

    What I want to do is "Deny user  domain1\UserA" to see the search result.

    So I wrote the code like: 

    claims.AddLast(new Tuple<Claim, bool>(new Claim("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name", @"domain1\UserA", "http://www.w3.org/2001/XMLSchema#string", "SharePoint", "Windows"), true));

    return claims;

    Actually, I tried many other claim types according to https://msdn.microsoft.com/en-us/library/microsoft.identitymodel.claims.claimtypes_fields.aspx. 

    But none of them worked.

    Can anyone tell what the problem is?

    Thanks in advance!




    • 已编辑 brouno 2016年3月4日 9:10 Translate to English
    2016年3月3日 15:55

全部回复