Hi,
The only way to do this is to call the webservice of SRS. Here you can
retrieve the system-wide policies by calling the GetSystemPolicies method.
This will return an array of policies. Just look in the list for the correct
GroupUserList and you can get his role.
<code>
public ReportService.Role[] GetUserRoles(string UserID)
{
ReportService.ReportingService rService =
new ReportService.ReportingService();
ReportService.Policy[] rsPolicies;
rService.Credentials = System.Net.CredentialCache.DefaultCredentials;
rService.Url = "http://localhost/reportserver/ReportService.asmx";
rsPolicies = rService.GetSystemPolicies();
foreach (ReportService.Policy rsPolicy in rsPolicies)
{
if (rsPolicy.GroupUserName==UserID) { return rsPolicy.Roles; }
}
return null;
}
</code>
Hope this would help you further.
Jan Pieter Posthuma
[quoted text, click to view] "Bob" wrote:
> Hi,
>
> Thank you, that helps. I have one additional question. In my external
> assembly, how would I reference/retrieve the roles a person belongs to bases
> on their UserID?
>
> Bob
>
> "Jan Pieter Posthuma" wrote:
>
> > Hi,
> >
> > You can use the Global variable User!UserID for this purpose. It contains
> > the actual domain\userID of the person. In your external assembly you can
> > look for the roles/groups the user belongs to.
> >
> > Hope this would help you.
> >
> > Jan Pieter Posthuma
> >
> > "Bob" wrote:
> >
> > > I need some suggestions on how to provide column level security within RS.
> > > This there a function or Global/User that provides the roles the current user
> > > belongs to? If the roles are accessible within the code script, I thought I
> > > could pass it to an external assembly to perform validation check. I would
> > > rather retrieve the value in the external assembly without the use of a
> > > parameter. The assembly would return a boolean indicating if the role as
> > > permission to see the value. The value would be set to "N/A" if they did not
> > > have sufficient permissions.
> > >
> > > Any suggestions would be greatly appreciated!!
> > >
> > > Thank you,
> > >