Development#11
Merged
Merged
Conversation
…itecture + CQRS - Move authorization from core to dedicated module with full layer separation - Create application layer with CQRS pattern (commands, queries, handlers) - Rename 'presenter' to 'presentation' for consistency - Organize domain services and infrastructure repositories properly - Fix directory structure to match standard DDD boundaries - Update imports and dependencies accordingly
…review-dfff8 Update from task 9d6c2646-8dbc-409e-bccc-824f40edfff8
- New SQLAlchemy models for authorization including CasbinRuleModel, PermissionModel, AuthorizationResourceModel, RoleModel, RolePermissionModel, and UserHasRoleModel with proper relationships and constraints - Implementation of SQLAlchemyCasbinPolicyRepository with full CRUD operations for roles, permissions, and policies including cursor-based pagination - CasbinAuthorizationService integrating with the repository layer and providing dynamic enforcer building for access control decisions - Infrastructure setup for authorization module with proper domain entities, services, and repository patterns following the application architecture This commit establishes a comprehensive authorization system backend with database persistence, supporting role-based access control through Casbin policies and efficient data management through SQLAlchemy ORM.
Update from task 90279199-752f-4c5d-8ba2-2d3b805e8caa
Key features implemented: - Updated import paths in CasbinAuthorizationService to reflect new core infrastructure location - Updated import paths in GetRoleQueryHandler to reflect new core infrastructure location - Updated import paths in dependency injection module to reflect new core infrastructure location - Updated import paths in permission router to reflect new core infrastructure location - Updated import paths in role router to reflect new core infrastructure location - Removed old authorization infrastructure modules and models from src/modules/authorization/infrastructure/ - Streamlined .gitignore file with consolidated ignore patterns The changes consolidate the authorization infrastructure under the core module and update all relevant imports across the application, removing redundant legacy infrastructure files.
Update from task 2f7c629a-0783-47de-832a-d79f0b036efe
… Handlers Key features implemented: - New docs/NORMALIZED_USER_DOMAIN.md detailing normalized schema design rationale and structure - New src/modules/user/infrastructure/models/__init__.py aggregating all user domain models - New src/modules/user/infrastructure/models/user_*_model.py files for normalized user entities (address, contact, profile, security, settings, verification) - Updated src/modules/authorization/infrastructure/models/*_model.py with indexing optimizations - Updated src/modules/user/application/auth/login_user/handler.py to reference password_hash correctly - Updated src/modules/user/application/auth/register_user/handler.py to use password_hash in User.create - Updated src/modules/user/application/detail_user/handler.py to fetch user with relations via get_by_id_with_relations - Updated src/modules/user/domain/entities/user.py with normalized entity structure including profile, settings, security - Updated src/modules/user/domain/repositories/user_repository.py interface for relation handling - Updated src/modules/user/infrastructure/models/user_model.py to reflect normalized structure and relationships - Updated src/modules/user/infrastructure/repositories/user_repository.py implementation for normalized data access The changes implement a fully normalized user domain following DDD principles, separating concerns into distinct bounded contexts while updating application handlers to utilize the new structure. The repository layer now supports fetching related user data efficiently.
…re-0d379 Update from task d9094924-b67f-44f0-bb30-c9ebeaa0d379
…itignore - Updated .gitignore with standard Python project exclusions and removed redundant entries - Modified PermissionModel to remove direct imports and use string references for relationships - Modified AuthorizationResourceModel to remove direct imports and use string references for relationships - Modified RolePermissionModel to remove direct imports and use string references for relationships - Modified UserHasRoleModel to remove direct imports and use string references for relationships This change eliminates circular import dependencies between authorization models while maintaining all existing functionality and relationships. The gitignore file now follows standard conventions for Python projects.
Update from task 6bbbcb92-32e0-4063-9356-01fd62bb6fdb
Fix/normalized database seed
Key features implemented: - Added comprehensive ORM relationship and foreign key metadata regression tests in test_database_relationships.py - Restored missing foreign key constraints in authorization models (permission, role_permission, user_has_role) and todo model - Converted normalized user identifier columns across 7 user models to UUID type with proper foreign key references - Updated Alembic environment to load complete user model package for accurate metadata reflection - Created corrective Alembic migration to convert string user IDs to UUID and create all missing foreign key constraints - Added contract tests for the corrective migration covering both upgrade and downgrade operations The implementation restores all 13 intended foreign keys while ensuring normalized user identifiers use UUID consistently, enabling successful database seeding without SQLAlchemy mapper errors.
…e7a15 Update from task 4c631340-f28c-44ee-a658-3d32babe7a15
- Added TwoFactorAuthService supporting TOTP (Google Authenticator) and email-based 2FA with backup codes - Implemented 2FA setup, verification, disabling, and regeneration commands with corresponding handlers - Created new API router and request/response schemas for 2FA endpoints - Updated LoginUserCommandHandler to integrate 2FA verification and temporary token generation - Enhanced account lockout mechanism to prevent brute force login attempts - Added dependency injection for new 2FA handlers and integrated with existing auth flow
Update from task c473550d-b98f-4134-bd8b-46abf61bc71e
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.