How to get all folder level permission on Report Server

SELECT CASE RSCatalog.TYPE
WHEN 1 THEN ‘Folder’
ELSE ‘Report’
END AS [Type] ,
RSCatalog.Path ,
RSCatalog.Name AS Report ,
Users.UserName ,
Roles.RoleName
FROM [dbo].[Catalog] RSCatalog
INNER JOIN [dbo].[PolicyUserRole] PolicyUserRole ON RSCatalog.PolicyID = PolicyUserRole.PolicyID
INNER JOIN [dbo].[Roles] Roles ON PolicyUserRole.RoleID = Roles.RoleID
INNER JOIN [dbo].[Users] Users ON PolicyUserRole.UserID = Users.UserID
WHERE RSCatalog.TYPE IN ( 1, 2 )
ORDER BY RSCatalog.Path ,
RSCatalog.Name ,
Users.UserName

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s