refactor(api): introduce type aliases and enhance request context interfaces#710
Merged
refactor(api): introduce type aliases and enhance request context interfaces#710
Conversation
Owner
Ahoo-Wang
commented
Feb 4, 2026
- Introduce AppId, DeviceId, RequestId, PermissionId, PolicyId, RoleId type aliases
- Add SpaceIdCapable interface with default implementation and constants
- Update AppPermission interface to use AppId and PermissionId types
- Enhance AppRolePermission interface to use RoleId for rolePermissionIndexer
- Modify AppRolePermissionRepository to include spaceId parameter and use typed IDs
- Update cache interfaces to use typed key converters (AppId, SpacedRoleId)
- Add spaceId field to Request interface with header/query parsing logic
- Include spaceId in condition schema and PartExtractor for policy conditions
- Add SpacedRoleId data class with conversion utilities for role-space mapping
- Create OrderedCorsWebFilter with configurable order for CORS handling
- Update filter ordering constants and remove magic numbers in webflux module
- Refactor role-based permission caching to use spaced role identifiers
- Update authorization logic to pass spaceId when fetching app role permissions
- Add comprehensive test coverage for new space-aware functionality
…erfaces - Introduce AppId, DeviceId, RequestId, PermissionId, PolicyId, RoleId type aliases - Add SpaceIdCapable interface with default implementation and constants - Update AppPermission interface to use AppId and PermissionId types - Enhance AppRolePermission interface to use RoleId for rolePermissionIndexer - Modify AppRolePermissionRepository to include spaceId parameter and use typed IDs - Update cache interfaces to use typed key converters (AppId, SpacedRoleId) - Add spaceId field to Request interface with header/query parsing logic - Include spaceId in condition schema and PartExtractor for policy conditions - Add SpacedRoleId data class with conversion utilities for role-space mapping - Create OrderedCorsWebFilter with configurable order for CORS handling - Update filter ordering constants and remove magic numbers in webflux module - Refactor role-based permission caching to use spaced role identifiers - Update authorization logic to pass spaceId when fetching app role permissions - Add comprehensive test coverage for new space-aware functionality Signed-off-by: Ahoo Wang <ahoowang@qq.com>
… in JSON deserializers - Updated JsonActionMatcherSerializer to use properties().first() instead of fields().next() - Updated JsonConditionMatcherSerializer to use properties().first() instead of fields().next() - Ensures consistent property access behavior across JSON deserialization logic - Improves compatibility with different JSON node implementations Signed-off-by: Ahoo Wang <ahoowang@qq.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## 3.x #710 +/- ##
============================================
- Coverage 91.69% 91.62% -0.08%
- Complexity 606 608 +2
============================================
Files 148 149 +1
Lines 1819 1827 +8
Branches 157 157
============================================
+ Hits 1668 1674 +6
- Misses 73 74 +1
- Partials 78 79 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.