Запрет на получение удаленных даннных при авторизации
This commit is contained in:
parent
f57191019d
commit
ddcdef0aed
@ -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 = $"Не верный пользователь";
|
||||
|
Loading…
Reference in New Issue
Block a user