From ddcdef0aed0c91f68634c5f9be29ed8e1d335882 Mon Sep 17 00:00:00 2001 From: kotcheshir73 Date: Sun, 28 Mar 2021 10:52:15 +0400 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=BF=D1=80=D0=B5=D1=82=20=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D0=B5?= =?UTF-8?q?=20=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=BD=D1=8B=D1=85=20?= =?UTF-8?q?=D0=B4=D0=B0=D0=BD=D0=BD=D0=BD=D1=8B=D1=85=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=20=D0=B0=D0=B2=D1=82=D0=BE=D1=80=D0=B8=D0=B7=D0=B0=D1=86=D0=B8?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DepartmentPortal/Common/DatabaseCore/SecurityManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DepartmentPortal/Common/DatabaseCore/SecurityManager.cs b/DepartmentPortal/Common/DatabaseCore/SecurityManager.cs index 2d15f49..8eb4076 100644 --- a/DepartmentPortal/Common/DatabaseCore/SecurityManager.cs +++ b/DepartmentPortal/Common/DatabaseCore/SecurityManager.cs @@ -43,7 +43,7 @@ namespace DatabaseCore model.Model.UserId = User.Value; } - var roles = context.UserRoles.Where(x => x.UserId == model.Model.UserId).Select(x => x.Role).OrderByDescending(x => x.RolePriority).ToList(); + var roles = context.UserRoles.Where(x => x.UserId == model.Model.UserId && !x.IsDeleted).Select(x => x.Role).OrderByDescending(x => x.RolePriority).ToList(); if (roles == null) { ErrorMessage = $"Не верный пользователь";