USP_DATALIST_CONSTIT_SECURITY_ATTRIBUTE_SYSTEMROLES

This datalist returns all system roles that have been assigned the given constituent security attribute.

Parameters

Parameter Parameter Type Mode Description
@CONSTIT_SECURITY_ATTRIBUTEID uniqueidentifier IN Input parameter indicating the context ID for the data list.

Definition

Copy


                CREATE procedure dbo.USP_DATALIST_CONSTIT_SECURITY_ATTRIBUTE_SYSTEMROLES 
                (
                    @CONSTIT_SECURITY_ATTRIBUTEID uniqueidentifier
                )
                as
                    set nocount on;

                    select distinct
                        SYSTEMROLE.ID,
                        SYSTEMROLE.NAME,
                        SYSTEMROLE.DESCRIPTION
                    from
                        dbo.SYSTEMROLE
                        inner join dbo.SYSTEMROLEAPPUSER on SYSTEMROLEAPPUSER.SYSTEMROLEID = SYSTEMROLE.ID
                        inner join dbo.SYSTEMROLEAPPUSERCONSTITUENTSECURITY on SYSTEMROLEAPPUSERCONSTITUENTSECURITY.SYSTEMROLEAPPUSERID = SYSTEMROLEAPPUSER.ID
                    where
                        SYSTEMROLEAPPUSERCONSTITUENTSECURITY.CONSTITUENTSECURITYATTRIBUTEID = @CONSTIT_SECURITY_ATTRIBUTEID and
                        SYSTEMROLEAPPUSER.CONSTITUENTSECURITYMODECODE = 2
                    order by
                        SYSTEMROLE.NAME;