Refactor permissions and user DTOs to use imphnen_entities module
- Updated permissions_repository.rs to import PermissionsItemDto from imphnen_entities. - Modified permissions_schema.rs to import PermissionsItemDto and PermissionsQueryDto from imphnen_entities. - Changed roles_dto.rs to import PermissionsItemDto and PermissionsQueryDto from imphnen_entities. - Updated users_dto.rs to import ExperienceDto, EducationDto, UsersDetailQueryDto, RolesDetailQueryDto, and RolesDetailItemDto from imphnen_entities, and removed redundant struct definitions. - Refactored users_repository.rs to import UsersDetailQueryDto from imphnen_entities. - Updated users_schema.rs to import UsersDetailQueryDto, ExperienceDto, and EducationDto from imphnen_entities. - Modified users_service.rs to use UsersDetailQueryDto from imphnen_entities and added UserLookupService implementation. - Updated Cargo.toml in imphnen-libs to include async-trait as a workspace dependency. - Refactored axum module to remove redundant imports and streamline code. - Updated lib.rs to include AppState struct with user_lookup_service and auth_repository fields. - Refactored surrealdb module to define SurrealWsClient and SurrealMemClient types. - Removed imphnen-iam dependency from middleware's Cargo.toml. - Updated auth_middleware to use UsersDetailQueryDto from imphnen_entities and refactored user retrieval logic. - Refactored permissions_middleware to use PermissionsEnum from imphnen_entities and updated user retrieval logic. - Updated mock_test.rs to create AppState with user_lookup_service and auth_repository. - Added permissions.rs and users.rs to imphnen_entities with necessary DTOs and enums. - Created services.rs in imphnen-libs to define UserLookupService and AuthRepositoryTrait traits.
This commit is contained in:
Generated
+5
-1
@@ -2122,9 +2122,12 @@ dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
"serde",
|
||||
"strum 0.27.2",
|
||||
"strum_macros 0.27.2",
|
||||
"surrealdb",
|
||||
"thiserror 2.0.14",
|
||||
"utoipa",
|
||||
"uuid",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2189,6 +2192,7 @@ name = "imphnen-iam"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
"axum",
|
||||
"axum-extra",
|
||||
"axum-test",
|
||||
@@ -2227,6 +2231,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"argon2",
|
||||
"async-trait",
|
||||
"axum",
|
||||
"base64 0.22.1",
|
||||
"chrono",
|
||||
@@ -2258,7 +2263,6 @@ dependencies = [
|
||||
"chrono",
|
||||
"futures",
|
||||
"imphnen-entities",
|
||||
"imphnen-iam",
|
||||
"imphnen-libs",
|
||||
"imphnen-utils",
|
||||
"lazy_static",
|
||||
|
||||
Reference in New Issue
Block a user