UFN_SECURITY_APPUSER_GRANTED_SECURITYATTRS_FORMAPENTITY
Returns a table of Constit Security Attribute IDs for which the user has been granted the MAPENTITY according to the role security groups.
Return
Return Type |
---|
table |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@APPUSERID | uniqueidentifier | IN | |
@MAPENTITYCATALOGID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_SECURITY_APPUSER_GRANTED_SECURITYATTRS_FORMAPENTITY
(
@APPUSERID uniqueidentifier,
@MAPENTITYCATALOGID uniqueidentifier
)
returns TABLE as
/*
Returns a row for every constituent security attribute that the the user has rights to according to record access security.
*/
RETURN
(
select distinct
SYSTEMROLEAPPUSERCONSTITUENTSECURITY.CONSTITUENTSECURITYATTRIBUTEID
from
dbo.SYSTEMROLEPERM_MAPENTITY
inner join dbo.SYSTEMROLEAPPUSER on SYSTEMROLEPERM_MAPENTITY.SYSTEMROLEID = SYSTEMROLEAPPUSER.SYSTEMROLEID
inner join dbo.SYSTEMROLEAPPUSERCONSTITUENTSECURITY on SYSTEMROLEAPPUSERCONSTITUENTSECURITY.SYSTEMROLEAPPUSERID = SYSTEMROLEAPPUSER.ID
where
SYSTEMROLEAPPUSER.APPUSERID = @APPUSERID and
SYSTEMROLEAPPUSER.CONSTITUENTSECURITYMODECODE = 2 and
SYSTEMROLEPERM_MAPENTITY.MAPENTITYCATALOGID = @MAPENTITYCATALOGID
)