USP_SIMPLEDATALIST_SITESFORUSERINCONTEXTOFFEATURE2
List of all sites in the system that a given user could interact with in the context of a specific feature, based on Role assignments.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@SECURITYFEATUREID | uniqueidentifier | IN | |
@SECURITYFEATURETYPE | tinyint | IN |
Definition
Copy
create procedure dbo.[USP_SIMPLEDATALIST_SITESFORUSERINCONTEXTOFFEATURE2]
(
@CURRENTAPPUSERID uniqueidentifier,
@SECURITYFEATUREID uniqueidentifier,
@SECURITYFEATURETYPE tinyint
)
as
set nocount on;
select
[SITE].[ID] as [VALUE],
[SITE].[NAME] as [LABEL]
from dbo.[SITE]
where (dbo.UFN_APPUSER_ISSYSADMIN(@CURRENTAPPUSERID) = 1 or exists (select 1 from dbo.UFN_SITESFORUSERONFEATURE(@CURRENTAPPUSERID,@SECURITYFEATUREID,@SECURITYFEATURETYPE) where SITEID=[SITE].[ID] or (SITEID is null and [SITE].[ID] is null)))
order by [SITE].[NAME];