From e51ea2c04df6fc9e65adf6c9001c2820f29726da Mon Sep 17 00:00:00 2001 From: Argo-Lenovo Date: Thu, 10 Nov 2016 14:05:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BUG=EF=BC=8CAdministrators?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=9A=84=E4=BA=BA=E6=96=B0=E5=A2=9E=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E5=90=8E=E6=97=A0=E6=B3=95=E7=9C=8B=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DatabaseScripts/Procedures.sql | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/DatabaseScripts/Procedures.sql b/DatabaseScripts/Procedures.sql index dfb21d45..c5414188 100644 --- a/DatabaseScripts/Procedures.sql +++ b/DatabaseScripts/Procedures.sql @@ -136,7 +136,7 @@ BEGIN inner join ( select nr.NavigationID from Users u inner join UserRole ur on ur.UserID = u.ID - inner join NavigationRole nr on nr.RoleID = ur.RoleID + inner join NavigationRole nr on nr.RoleID = ur.RoleID where u.UserName = @userName union select nr.NavigationID from Users u @@ -144,6 +144,13 @@ BEGIN inner join RoleGroup rg on rg.GroupID = ug.GroupID inner join NavigationRole nr on nr.RoleID = rg.RoleID where u.UserName = @userName + union + select n.ID from Navigations n + where EXISTS (select UserName from Users u + inner join UserRole ur on u.ID = ur.UserID + inner join Roles r on ur.RoleID = r.ID + where u.UserName = @userName and r.RoleName = N'Administrators' + ) ) nav on n.ID = nav.NavigationID END GO