UFN_APPUSER_GRANTED_QUERYVIEW
Returns true if the user has been granted and not denied permission to the given query view.
Return
Return Type |
---|
table |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@APPUSERID | uniqueidentifier | IN | |
@QUERYVIEWCATALOGID | uniqueidentifier | IN |
Definition
Copy
CREATE function dbo.UFN_APPUSER_GRANTED_QUERYVIEW
(
@APPUSERID uniqueidentifier,
@QUERYVIEWCATALOGID uniqueidentifier
)
returns table
as
return
select
coalesce
(
(
select top 1
GRANTORDENY
from
dbo.V_SECURITY_SYSTEMROLEASSIGNMENT_USER_QUERYVIEW
where
APPUSERID = @APPUSERID and
QUERYVIEWCATALOGID = @QUERYVIEWCATALOGID
order by
GRANTORDENY asc
), 0
) as GRANTORDENY