You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INNER JOIN catalog_type_description tpd ON cat.[Type] =tpd.TypeID
91
79
LEFT JOINdbo.PolicyUserRole urol ONurol.PolicyID=cat.PolicyID
92
80
LEFT JOINdbo.Roles rol ONurol.RoleID=rol.RoleID
93
-
LEFT JOIN reporting_role_names rpt ONrpt.RoleName=rol.RoleName
94
81
LEFT JOINdbo.Policies pol ONurol.PolicyID=pol.PolicyID
95
82
LEFT JOIN user_list usr ONurol.UserID=usr.UserID
96
83
LEFT JOIN nonreport_folders nrf ONnrf.FolderName=cat.Name
97
84
WHERE
98
85
1=1
99
86
ANDnrf.FolderNameISNULL
100
-
)
101
-
SELECT DISTINCT
102
-
FolderName =rpt.Name
103
-
, rpt.RoleName
104
-
, UserNameFormat =STUFF((SELECT'; '+rol.UserNameFormatFROM reporting_roles rol WHERErol.RoleName=rpt.RoleNameANDrol.Name=rpt.Name FOR XMLPATH('')),1,1,'')
105
-
, ReportingRoleName
106
-
FROM
107
-
reporting_roles rpt
108
-
WHERE
109
-
1=1
110
-
AND (
111
-
CASE
112
-
WHEN @HideNonAccessGroups =0THEN1
113
-
ELSE2
114
-
END
115
-
)
116
-
<=
117
-
(
118
-
CASE
119
-
WHENISNULL(ReportingRoleName, '') =''THEN1
120
-
ELSE2
121
-
END
122
-
)
87
+
AND (@all_value IN(@UserName) ORusr.UserNameFormatIN(@UserName))
0 commit comments