Development by fiqrikm18 · Pull Request #12 · IDTS-LAB/python-codebase · GitHub
Skip to content

Development - #12

Closed
fiqrikm18 wants to merge 86 commits into
masterfrom
development
Closed

fiqrikm18 wants to merge 86 commits into
masterfrom
development

Conversation

@fiqrikm18

Copy link
Copy Markdown
Collaborator

No description provided.

fiqrikm18 and others added 30 commits June 20, 2026 10:42
…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
fiqrikm18 added 29 commits June 26, 2026 11:55
@fiqrikm18 fiqrikm18 closed this Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants