Suppose we have a report called SalesSummary for a large department. This department has many smaller teams for each product. People should be able to see information about their own product, and not about the products of other teams. We also have one domain group for each of these teams.
Copying a SalesSummary report for each team and setting permissions is not the best option, since we have many products. I thought to use code similar to below on RS, but it does not work. Apparently System.Security.Principal.WindowsPrincipal is disabled by RS by default.
Public Function isPermitted() As Boolean Dim Principal As New System.Security.Principal.WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent()) If (Principal.IsInRole("group_prod")) Then Return true Else Return false End If End Function
I also thought that I could send the user ID from RS to the SQL server, and inside my SP I can use the code similar to below to query the active directory. This also does not work due to security restrictions.
SELECT * FROM OPENQUERY(ADSI,'SELECT cn, ADsPath FROM ''LDAP://DC=Fabricam,DC=com'' WHERE objectCategory=''group''')
Is there an easier way to achieve this?
Thanks for the help!
source share