UFN_APPEAL_USERHASSITEACCESS
Returns true if a user has site security access to an appeal.
Return
| Return Type |
|---|
| bit |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @APPUSERID | uniqueidentifier | IN | |
| @APPEALID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_APPEAL_USERHASSITEACCESS
(
@APPUSERID uniqueidentifier,
@APPEALID uniqueidentifier
)
returns bit with execute as caller
as
begin
if exists
(
select SITEID
from
(
select SITE.ID as [SITEID]
from dbo.APPEAL
left join dbo.SITE on SITE.ID = APPEAL.SITEID
where APPEAL.ID = @APPEALID
) as [APPEALSITES]
where dbo.UFN_SITEALLOWEDFORUSER(@APPUSERID, [APPEALSITES].SITEID) = 1
)
return 1;
else
return 0;
return 0;
end