Skip to content

Commit 392773a

Browse files
committed
Title: Refactor authorization infrastructure and update imports
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.
1 parent a8508da commit 392773a

18 files changed

Lines changed: 23 additions & 780 deletions

File tree

.gitignore

Lines changed: 17 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,29 @@
1-
2-
# Python
1+
```
32
__pycache__/
43
*.pyc
54
*.pyo
65
*.pyd
7-
.Python
8-
*.so
9-
*.egg-info/
10-
.eggs/
11-
.cache/
12-
13-
# Virtual environments
14-
venv/
15-
.venv/
16-
env/
17-
ENV/
18-
.ENV
19-
20-
# Build artifacts
21-
build/
22-
dist/
23-
*.egg
24-
25-
# Testing
6+
.pytest_cache/
267
.coverage
8+
coverage/
279
htmlcov/
28-
.pytest_cache/
29-
.mypy_cache/
30-
31-
# Logs
3210
*.log
33-
34-
# Environment variables
11+
*.tmp
12+
*.swp
13+
*.swo
14+
.DS_Store
15+
Thumbs.db
3516
.env
3617
.env.local
3718
*.env.*
38-
39-
# IDE
4019
.vscode/
4120
.idea/
42-
*.swp
43-
*.swo
44-
*.tmp
45-
46-
# OS
47-
.DS_Store
48-
Thumbs.db
49-
50-
# Coverage
51-
coverage/
21+
.mypy_cache/
22+
node_modules/
23+
venv/
24+
.venv/
25+
dist/
26+
build/
27+
target/
28+
.gradle/
29+
```

src/core/authorization/infrastructure/services/casbin_authorization_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from src.modules.authorization.domain.services.authorization_service import (
66
AuthorizationService,
77
)
8-
from src.modules.authorization.infrastructure.repositories.casbin_policy_repository import (
8+
from src.core.authorization.infrastructure.repositories.casbin_policy_repository import (
99
SQLAlchemyCasbinPolicyRepository,
1010
)
1111
from src.modules.authorization.domain.entities.permission import Permission

src/modules/authorization/application/get_role/handler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from src.modules.authorization.application.get_role.query import GetRoleQuery
22
from src.modules.authorization.domain.entities.role import Role
3-
from src.modules.authorization.infrastructure.repositories.casbin_policy_repository import (
3+
from src.core.authorization.infrastructure.repositories.casbin_policy_repository import (
44
CasbinPolicyRepository,
55
)
66

src/modules/authorization/infrastructure/__init__.py

Whitespace-only changes.

src/modules/authorization/infrastructure/models/__init__.py

Whitespace-only changes.

src/modules/authorization/infrastructure/models/casbin_rule_model.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/modules/authorization/infrastructure/models/permission_model.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/modules/authorization/infrastructure/models/resource_model.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/modules/authorization/infrastructure/models/role_model.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/modules/authorization/infrastructure/models/role_permission_model.py

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)