UFN_SECURITY_APPUSER_GRANTED_CODETABLEENTRY
Returns true if the user has not been denied the code table entry for a system role.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@APPUSERID | uniqueidentifier | IN | |
@CODETABLEENTRYID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_SECURITY_APPUSER_GRANTED_CODETABLEENTRY
(
@APPUSERID uniqueidentifier,
@CODETABLEENTRYID uniqueidentifier
)
returns bit
as
/*
Returns true if the user has not been denied the code table entry for a system role.
This function is optimized for use from the Blackbaud.AppFx.Security.Catalog.CodeTableEntrySecurityService
class which implements the RecordSecurity service for code table entry record security.
As such, it assumes that a check for if the user is ISSYSADMIN occurs outside this function.
*/
begin
if exists (
select
1
from
dbo.V_SECURITY_SYSTEMROLEASSIGNMENT_USER_CODETABLEENTRY
with
(NOEXPAND, INDEX(IX_V_SECURITY_SYSTEMROLEASSIGNMENT_USER_CODETABLEENTRY_CODETABLEENTRYID_APPUSERID))
where
APPUSERID = @APPUSERID
and CODETABLEENTRYID = @CODETABLEENTRYID
and ISDENIED = 1
)
return 0;
return 1;
end