V_SECURITY_SYSTEMROLEASSIGNMENT_USER_KPI_BYROLE

Fields

Field Field Type Null Description
KPICATALOGID uniqueidentifier
APPUSERID uniqueidentifier
GRANTORDENY bit
PERMID uniqueidentifier
SYSTEMROLEID uniqueidentifier
RECORDSECURITYMODE tinyint
SITESECURITYMODE tinyint

Indexes

Index Name Fields Unique Primary Clustered
IX_V_SECURITY_SYSTEMROLEASSIGNMENT_USER_KPI_BYROLE_KPICATALOGID_APPUSERID KPICATALOGID, APPUSERID
IX_V_SECURITY_SYSTEMROLEASSIGNMENT_USER_KPI_BYROLE APPUSERID, PERMID yes yes

Definition

Copy

create view [dbo].[V_SECURITY_SYSTEMROLEASSIGNMENT_USER_KPI_BYROLE] with SCHEMABINDING
/*
Indexed view used to evaluate Security for KPIs
Includes a row for every system role/user/kpi permission that has been assigned.
*/
as
    select 
        SYSTEMROLEPERM_KPI.KPICATALOGID,
        SYSTEMROLEAPPUSER.APPUSERID ,
        SYSTEMROLEPERM_KPI.GRANTORDENY,
        SYSTEMROLEPERM_KPI.ID as PERMID,
        SYSTEMROLEPERM_KPI.SYSTEMROLEID,
        SYSTEMROLEAPPUSER.CONSTITUENTSECURITYMODECODE as RECORDSECURITYMODE,    
        SYSTEMROLEAPPUSER.SECURITYMODECODE as SITESECURITYMODE
    from 
        dbo.SYSTEMROLEPERM_KPI 
        inner join dbo.SYSTEMROLE on SYSTEMROLEPERM_KPI.SYSTEMROLEID = SYSTEMROLE.ID
        inner join dbo.SYSTEMROLEAPPUSER on SYSTEMROLEPERM_KPI.SYSTEMROLEID = SYSTEMROLEAPPUSER.SYSTEMROLEID