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