UFN_SECURITY_APPUSER_GRANTED_DASHBOARD_IN_SYSTEMROLE

Returns true if the user has been granted and not denied the dashboard for a System Role.

Return

Return Type
bit

Parameters

Parameter Parameter Type Mode Description
@APPUSERID uniqueidentifier IN
@DASHBOARDID uniqueidentifier IN

Definition

Copy


CREATE function dbo.UFN_SECURITY_APPUSER_GRANTED_DASHBOARD_IN_SYSTEMROLE (
    @APPUSERID uniqueidentifier,
    @DASHBOARDID uniqueidentifier

returns bit
as begin
    /* Returns true if user has been granted and not denied the business process for a System Role. */
    /* If at least one grant and no deny then return true; otherwise return false */
    declare @grant bit;
    set @grant=0;

    select top 1 
        @grant=GRANTORDENY
    from 
        dbo.V_SECURITY_SYSTEMROLEASSIGNMENT_USER_DASHBOARD
    where 
        APPUSERID = @APPUSERID
        and DASHBOARDCATALOGID=@DASHBOARDID
    order by 
        GRANTORDENY ASC;  /* deny will be first */

    return @grant;
end