V_SECURITY_SYSTEMROLEASSIGNMENT_USER_SMARTQUERY_BYROLE
Fields
| Field | Field Type | Null | Description |
|---|---|---|---|
| SMARTQUERYCATALOGID | 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_SMARTQUERY_BYROLE_SMARTQUERYCATALOGID_APPUSERID | SMARTQUERYCATALOGID, APPUSERID | |||
| IX_V_SECURITY_SYSTEMROLEASSIGNMENT_USER_SMARTQUERY_BYROLE | APPUSERID, PERMID | yes | yes |
Definition
Copy
create view [dbo].[V_SECURITY_SYSTEMROLEASSIGNMENT_USER_SMARTQUERY_BYROLE] with SCHEMABINDING
/*
Indexed view used to evaluate security for smart queries
Includes a row for every system role/user/smartquery permission that has been assigned.
*/
as
select
SYSTEMROLEPERM_SMARTQUERY.SMARTQUERYCATALOGID,
SYSTEMROLEAPPUSER.APPUSERID,
SYSTEMROLEPERM_SMARTQUERY.GRANTORDENY,
SYSTEMROLEPERM_SMARTQUERY.ID as PERMID,
SYSTEMROLEPERM_SMARTQUERY.SYSTEMROLEID,
SYSTEMROLEAPPUSER.CONSTITUENTSECURITYMODECODE as RECORDSECURITYMODE,
SYSTEMROLEAPPUSER.SECURITYMODECODE AS SITESECURITYMODE
from
dbo.SYSTEMROLEPERM_SMARTQUERY
inner join dbo.SYSTEMROLE on SYSTEMROLE.ID = SYSTEMROLEPERM_SMARTQUERY.SYSTEMROLEID
inner join dbo.SYSTEMROLEAPPUSER on SYSTEMROLEAPPUSER.SYSTEMROLEID = SYSTEMROLEPERM_SMARTQUERY.SYSTEMROLEID