UFN_STEWARDSHIPPLANTEMPLATE_USERHASSITEACCESS
Validates that the application user has access to the stewardship plan template based on site permissions.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@APPUSERID | uniqueidentifier | IN | |
@STEWARDSHIPPLANTEMPLATEID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_STEWARDSHIPPLANTEMPLATE_USERHASSITEACCESS
(
@APPUSERID uniqueidentifier,
@STEWARDSHIPPLANTEMPLATEID uniqueidentifier
)
returns bit with execute as caller
as
begin
if exists(select SITEID from dbo.UFN_SITEID_MAPFROM_STEWARDSHIPPLANTEMPLATEID(@STEWARDSHIPPLANTEMPLATEID) as TEMPLATESITES where dbo.UFN_SITEALLOWEDFORUSER(@APPUSERID, TEMPLATESITES.SITEID) = 1)
return 1
else
return 0
return 0
end