diff --git a/DepartmentPortal/Common/DatabaseCore/SecurityManager.cs b/DepartmentPortal/Common/DatabaseCore/SecurityManager.cs index 22f9d7a..9dc916d 100644 --- a/DepartmentPortal/Common/DatabaseCore/SecurityManager.cs +++ b/DepartmentPortal/Common/DatabaseCore/SecurityManager.cs @@ -29,7 +29,7 @@ namespace DatabaseCore { using var context = DatabaseManager.GetContext; Access access = null; - if (model != null) + if (model.Model != null) { // если не указан идентификатор пользователя, то смотрим, может он авторизован if (!model.Model.UserId.HasValue && User.HasValue)