Changes from throwing an exception when a user profile is not found to returning null.
This prevents the application from crashing when a user profile is not found, allowing for more graceful error handling.
Implement global exception handling to provide consistent error responses.
Registes custom exceptions with corresponding HTTP status codes and descriptions.
Relocates the endpoint for updating user admin status from the dedicated AdminController to the UserProfileController.
This consolidates user profile management under a single controller
and leverages existing authorization policies.
Adds an authorization policy to restrict access to admin-only endpoints.
Creates an `AdminOnlyRequirement` and `AdminOnlyHandler` to check if a user has admin privileges.
Applies the "AdminOnly" policy to the AdminController to secure admin functionalities.
Modifies the endpoint for changing user admin status to include the user ID in the route.
Moves the ChangeUserAdminStatusRequest to the ApiModels folder.
Updates the admin controller route to "admin" and the admin status
endpoint to "adminStatus".
Makes the ChangeUserAdminStatus method asynchronous.
Uses NotFoundException instead of KeyNotFoundException.
Adds functionality to allow administrators to modify the admin status of other users.
Introduces an endpoint for changing user admin status, accessible only to existing administrators.
This change includes necessary services and request models to handle the logic.
Implement a `UserWithProfileManager` to automatically create a default user profile upon user registration.
This ensures that each user has an associated profile with default values (e.g., `UserName`, `IsAdmin`, `IsDeleted`).
Updates the database schema to reflect the change from UserId to UserProfileId in the UserProfileCompanyTableStat and UserProfileProductTableStat entities.
Establishes a link between DbUserProfile and DbApplicationUser,
allowing for better management of user-related information
and integration with ASP.NET Identity.
Renames DbUser to DbUserProfile and updates related entities and configurations.