SSRS Custom assembly security permissions
===

I have created a Custom Assembly for my SSRS reports.

The Custom Assembly has got 2 functions:

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Security.Principal;
    
    namespace SSRS_Custom_Fuctions
    {
        public class Class1
        {
           public static bool IsInGroup(string user, string group)
            {
                using (var identity = new WindowsIdentity(user))
                {
                    var principal = new WindowsPrincipal(identity);
                    return principal.IsInRole(group);
                }
            }
    
           public static string MyTest()
           {
               return "Hello World";
           }
        }
    }

1)Basic function which returns string 'Hello World' - This works perfectly fine.
2)Returns boolean value which is using system.security namespace - This is not working, bailing out with error message 'request for the permission of type system.security failed'

I have modified the files rssrvpolicy.config in the ReportingServices file path & RSPreviewPolicy.config in the the VisualStudio file path.

The modification I made:Added codegroup which gives FullTrust to my custom assembly.

The following has been added to the policy level element:

    </CodeGroup>
       <CodeGroup class="UnionCodeGroup"
       version="1"
       PermissionSetName="FullTrust"
       Name="SSRS_Custom_Fuctions"
       Description="Code group for my data processing extension">
       <IMembershipCondition class="UrlMembershipCondition"
       version="1"
       Url="C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\SSRS_Custom_Fuctions.dll"
           />
    </CodeGroup>


