Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Using CurrentPrincipal.IsInRole to hide report objects - native mode vs. SharePoint integrated mode

$
0
0

I'm using code in a report to show/hide a column based on the current user.  It's using the following line of code to check role membership:

System.Threading.Thread.CurrentPrincipal.IsInRole("DOMAIN NAME\AD Group Name").

This works great when I deploy to our native mode SSRS server.  When I deploy to out SharePoint integrated mode server, however, it fails.  I think it's due to the way that SharePoint manages roles.  I've enabled the roleManager in web.config for SharePoint as I found a few related blogs that suggested I do that.

This may be more appropriate for a SharePoint forum, but I thought I would start here in case anyone has come across this before.

-Henry


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>