UFN_SECURITY_APPUSER_GRANTED_REPORT_IN_NONSITEROLE
Returns true if a user has access to a report in a role with no site security.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@APPUSERID | uniqueidentifier | IN | |
@REPORTCATALOGID | uniqueidentifier | IN |
Definition
Copy
CREATE function [dbo].[UFN_SECURITY_APPUSER_GRANTED_REPORT_IN_NONSITEROLE]
(
@APPUSERID uniqueidentifier,
@REPORTCATALOGID uniqueidentifier
)
returns bit as
/*
Returns true if the given user has permissions to the given report
in a role whose site security is set to all records.
*/
begin
if exists
(
select
1
from
dbo.V_SECURITY_SYSTEMROLEASSIGNMENT_USER_REPORT as SECURITYVIEW
where
SECURITYVIEW.APPUSERID=@APPUSERID and
SECURITYVIEW.REPORTCATALOGID=@REPORTCATALOGID and
SECURITYVIEW.GRANTORDENY=1 and
SECURITYVIEW.SITESECURITYMODE=0
) return 1;
return 0;
end