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!