UFN_SECURITY_APPUSER_GRANTED_REPORT_IN_NONRACROLE
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@APPUSERID | uniqueidentifier | IN | |
@REPORTCATALOGID | uniqueidentifier | IN |
Definition
Copy
create function BBDW.[UFN_SECURITY_APPUSER_GRANTED_REPORT_IN_NONRACROLE]
(
@APPUSERID uniqueidentifier,
@REPORTCATALOGID uniqueidentifier
)
returns bit as
/*
Returns true if the given user has permissions to the given report
in a role whose security group is blank
This function is optimized for use from the Blackbaud.AppFx.Security.Catalog.ConstitRecordSecurityService
class which implements the RecordSecurity service for Constituent record security.
As such, it assumes that a check for DENY occurs outside this function
and also assumes that a check for if the user is ISSYSADMIN occurs outside
this function.
*/
begin
--If user granted permission to the feature in a role with no ringfence then
--the user has permission regardless of the record in question.
if exists
(
select 1
from BBDW.[v_SECURITY_SYSTEMROLEASSIGNMENT_USER_REPORT] as SV
where
SV.[APPUSERID] = @APPUSERID
and SV.[REPORTCATALOGID] = @REPORTCATALOGID
and SV.[GRANTORDENY] = 1
and SV.[RECORDSECURITYMODE] = 0
)
return 1
return 0
end;