Die isAuthenticated()-Methode wurde aktualisiert, um den Anmeldestatus anhand des HTTP-Antwortstatus zu bestimmen, anstatt sich nur auf den Antwortkörper zu verlassen. Außerdem wird sichergestellt, dass `_isLogedIn` im Fehlerfall explizit auf false gesetzt wird. Dies verbessert die Zuverlässigkeit der Sitzungsvalidierung.
Überspringe die Anzeige der Fehlermeldung in isAuthenticated, wenn der Antwortstatus 401,
ist, was typischerweise anzeigt, dass der Benutzer einfach nicht eingeloggt ist, nicht ein Serverproblem.
Die Einrichtung des Logging-Anbieters wurde mit einer Prüfung versehen, um sicherzustellen, dass NLog nur verwendet wird, wenn es sich nicht in der Entwicklung befindet. Dadurch wird verhindert, dass das Standard-Protokollierungsverhalten während der Entwicklung überschrieben wird.
- Added conditional compilation for .NET Framework.
- Made `GeneralViewer`, `WanEnvironment`, and `DeletedWho` properties required with appropriate attributes.
- Renamed `UseridFkIntEcm` to `UserIdFkIntEcm` and marked it as required.
- Changed `DeletedWhen` to a non-nullable `DateTime`.
- Removed previously ignored columns, activating them in the class definition.
Updated version, assembly version, and file version for:
- DigitalData.UserManager.API: 6.0.1 to 6.1.0
- DigitalData.UserManager.Application: 3.1.3 to 3.2.0
- DigitalData.UserManager.DependencyInjection: 1.0.0 to 1.1.0
- DigitalData.UserManager.Domain: 3.1.0 to 3.2.0
- DigitalData.UserManager.Infrastructure: 3.0.2 to 3.1.0
Added warning suppression in `Program.cs` for obsolete user manager configuration. Marked `ClientUserRepository` as obsolete to encourage transition to the new `Repository` class.
- Added obsolete attributes to `AuthController`, `ModuleController`, and various mapping profiles, recommending the use of MediatR and DigitalData.Core.Exceptions.
- Updated `User` class to use `required` keyword for `DateFormat` in .NET 7.0 or greater.
- Marked methods in `Extensions` and `AddUserManagerInfrastructure` as obsolete, suggesting the use of IRepository.
- Adjusted import statements in `DependencyInjection.cs` and marked `GroupOfUserRepository` and `ModuleRepository` as obsolete, recommending a Repository pattern.
Introduce `[Obsolete]` attributes to various methods and classes, suggesting alternatives such as MediatR and IRepository. Mark multiple DTOs and repository classes as obsolete, recommending the use of DigitalData.Core.Exceptions and .Middleware or Repository. This change aims to enhance maintainability and clarity in the codebase.
Removed nullable indicators from string properties in
BaseEntity.cs, ClientUser.cs, Group.cs, and User.cs.
The Username property in User.cs is now marked as
required for .NET 7 or greater, improving data integrity
and reducing null reference risks.
Updated `DigitalData.UserManager.Domain.csproj` to support .NET 4.6.2, 7.0, 8.0, and 9.0. Adjusted implicit usings and nullable reference types settings based on the target framework, disabling nullable types for `net462` and enabling them for others.
Refactored entity classes (`BaseEntity`, `ClientUser`, `Group`, `GroupOfUser`, `Module`, `ModuleOfUser`, `User`, and `UserRep`) to conditionally include nullable reference types. Added `?` operator for string properties in .NET 7.0 and above, enhancing code safety and reducing null reference exceptions.
Updated `DigitalData.UserManager.Domain.csproj` to target .NET Framework 4.6.2 alongside .NET 7.0, 8.0, and 9.0. Corrected `PackageTags` from "user maanger" to "user manager" and added property groups for implicit usings and language versions.
Introduced nullable reference types in entity classes (`BaseEntity`, `ClientUser`, `Group`, `User`, etc.) for enhanced type safety. Updated properties in the `User` and `UserRep` classes to use the new nullable syntax, ensuring consistency across the codebase.
These changes improve compatibility with newer C# features and maintain support for multiple frameworks.
Refactor namespaces from `DigitalData.Core.DTO` to `DigitalData.Core.Abstraction.Application.DTO` in multiple controllers to adopt a new abstraction layer. Update `DigitalData.Core.API` package from version `2.2.0` to `2.2.1` and add `DigitalData.Core.Abstraction.Application` package with version `1.0.0`. Add `[Obsolete("Use MediatR")]` attribute to several controllers to encourage transitioning to MediatR for request handling.
- Added using directive for DigitalData.Core.Abstraction.Application.DTO.
- Marked IUserService and GetUserWithClaims as obsolete.
- Transitioning towards MediatR for handling requests and responses.
Replaced the namespace import from `DigitalData.Core.DTO` to `DigitalData.Core.Abstraction.Application.DTO` in `BaseReadDto.cs`. Added an `Obsolete` attribute to indicate deprecation and recommend using `DigitalData.Core.Exceptions and .Middleware` instead. This change enhances code organization and clarity.
Updated namespaces for DTOs and services to improve project organization. Marked several interfaces as obsolete in favor of MediatR for better request handling. Simplified `BaseUpdateDto` and other DTOs by removing `IUnique<int>` implementation. Changed return types of `CreateAsync` methods to return corresponding read DTOs. Removed reference to `DigitalData.Core.DTO` in the project file, reflecting a shift in architecture for maintainability.
Added an `Obsolete` attribute to the `IBaseService` interface, recommending the use of MediatR instead. This change serves as a warning to developers about potential deprecation, encouraging a transition to the suggested alternative.
Updated the import statement for `DigitalData.Core.Abstractions.Application` to `DigitalData.Core.Abstraction.Application` in `IBaseService.cs`. Removed the `PackageReference` for `DigitalData.Core.Abstractions` version `4.0.0` from the project file, indicating a shift in library usage.
- Updated package references to newer versions for `DigitalData.Auth.Client`, `DigitalData.Core.API`, `DigitalData.Core.Abstractions`, `DigitalData.Core.Application`, and `DigitalData.EmailProfilerDispatcher.Abstraction`.
- Changed `UserManager.Domain` package version from `3.0.2` to `3.1.0` and updated assembly and file versions.
- Removed `IUnique<int>` interface implementation from `BaseEntity`, `ClientUser`, `Module`, and `ModuleOfUser`.
- Added data annotations to the `User` class for various properties that were previously commented out.
- Updated `Microsoft.EntityFrameworkCore` package references in the `Infrastructure` project for `net7.0` and `net9.0`.
- Modified solution configuration to change a project's build configuration from Debug to Release.
- Changed SDK declaration to include a non-breaking Unicode character.
- Incremented version number from 3.0.1 to 3.0.2 for package and assembly.
- Updated copyright year to 2024.
Die Projektdateien für `DigitalData.UserManager` wurden geändert, um auf ein neues Paketsymbol zu verweisen, das sich unter `..\Assets\icon.png` befindet. Dazu gehört das Hinzufügen des Elements „<PackageIcon>“ in „DigitalData.UserManager.API.csproj“ und die Aktualisierung der Elemente „<None>“ in mehreren Projektdateien. Die alte Icondatei wurde gelöscht, und die Abschnitte von `<ItemGroup>` wurden angepasst, um sicherzustellen, dass das neue Icon korrekt in das Projekt gepackt wird.
Es wurde ein neues Projekt namens "Assets" eingeführt, das eine Symboldatei (`icon.png`) enthält. Dieses Projekt ist in der Struktur der Projektmappe unter "Projektmappenobjekte" organisiert, was die Verwaltung der Projektressourcen verbessert.
Aktualisierte Versionsnummern für API-, Anwendungs- und Infrastrukturprojekte:
- API: 6.0.0 auf 6.0.1
- Anwendung: 3.1.2 bis 3.1.3
- Infrastruktur: 3.0.1 bis 3.0.2
Außerdem wurden die Assembly- und Dateiversionen entsprechend aktualisiert. Zwei unbenutzte JavaScript-Dateien wurden aus dem API-Projekt entfernt.
Updated `Program.cs` to eliminate the Windows service conditional check.
Updated `DigitalData.Core.Abstractions` and `DigitalData.Core.Application`
to versions 3.4.1 and 3.2.1, respectively. Removed the
`DigitalData.Core.Infrastructure` package reference. In
`DigitalData.UserManager.Infrastructure.csproj`, updated
`DigitalData.Core.Infrastructure` to version 2.0.1 and added
`Microsoft.EntityFrameworkCore.Relational` for net7.0, net8.0,
and net9.0 with corresponding versions.
Added `DigitalData.Core.Infrastructure` version `2.0.0` and updated package references for `net7.0`, `net8.0`, and `net9.0` in `DigitalData.UserManager.Application.csproj`. Updated `AutoMapper` to version `14.0.0` for `net8.0` and `net9.0`, along with other related packages to their latest versions.
Removed the fixed version for Microsoft.EntityFrameworkCore
and added conditional references for versions 7.0.20, 8.0.15,
and 9.0.4 based on target frameworks net7.0, net8.0, and
net9.0, respectively.
Unnötige Paketverweise wurden aus dem API-Projekt entfernt, einschließlich Entity Framework Core und System.DirectoryServices. Ersetzte `AddDbContext` durch `AddUserManager` in `Program.cs`, um die UserManager-Dienstkonfiguration zu rationalisieren. Die Datei `Extensions.cs` wurde aktualisiert, um die Überladung der Verbindungszeichenfolge für `AddUserManager` zu entfernen, und `DependencyInjection.cs` wurde geändert, um die Einrichtung der UserManager-Infrastruktur zu vereinfachen.
Verweise auf DigitalData.UserManager.Application und
DigitalData.UserManager.Domain in DigitalData.UserManager.API.csproj entfernt.
Ein Verweis auf DigitalData.UserManager.DependencyInjection
wurde hinzugefügt, um die Architektur zu rationalisieren und die Verwaltung von Abhängigkeiten zu verbessern.
Program.cs wurde aktualisiert, um den neuen Namespace für Dependency Injection
für ein verbessertes Service-Management aufzunehmen.
Umbenennung der Methoden für mehr Klarheit: `AddUserManager` zu `AddUserManagerApplication` und `AddInfrastructureServices` zu `AddUserManagerInfrastructure`. Neue Projektreferenzen für `Application`, `Domain` und `Infrastructure` in der `DigitalData.UserManager.DependencyInjection.csproj` hinzugefügt. Einführung von Erweiterungsmethoden in `Extensions.cs`, um die Registrierung von UserManager-Diensten zu rationalisieren und die Kohärenz zwischen Infrastruktur- und Anwendungsdienstregistrierungen zu verbessern.