Запрет на получение удаленных даннных при авторизации

This commit is contained in:
kotcheshir73 2021-03-28 10:52:15 +04:00
parent f57191019d
commit ddcdef0aed

View File

@ -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 = $"Не верный пользователь";