Commit graph

9 commits

Author SHA1 Message Date
b59fef222f Implement admin-only authorization policy
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.
2025-08-10 18:07:34 +02:00
c0860b05d1 Enable admin status management
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.
2025-08-10 13:55:20 +02:00
e06700458f Create default user profile on registration
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.
2025-08-09 18:54:27 +02:00
e7ce2c7718 Fix forgotten renaming of user, change applicationuser id type to guid 2025-08-09 17:57:41 +02:00
d2e156b9f1 Fix identityuser being used instead of DbApplicationUser 2025-08-09 17:05:55 +02:00
9892337644 Merge IdentityDbContext into ApplicationDbContext 2025-08-09 16:09:37 +02:00
Jiří Vrabec
e6ed0d1b37 Create base db migration 2025-08-09 14:54:45 +02:00
Jiří Vrabec
b7996872cb Add EF objects 2025-08-09 01:00:49 +02:00
Jiří Vrabec
6c5a4bfb26 INIT 2025-08-08 23:28:03 +02:00