Closed valentinyanakiev closed 1 week ago
The changes introduce a new utility function, filterAndMapEnabledEntitlements
, which is utilized in the UserProvider
component and the useCollaborationAuthorizationEntitlements
function. The logic for determining the canSaveAsTemplate
property has been updated to rely on entitlements rather than privileges. The new function simplifies the filtering and mapping of enabled entitlements, enhancing code readability and maintainability across the affected components.
File | Change Summary |
---|---|
src/domain/collaboration/authorization/useCollaborationAuthorization.ts |
- Added import for filterAndMapEnabledEntitlements . - Updated logic for canSaveAsTemplate to use entitlements instead of privileges. - Introduced collaborationEntitlements variable. |
src/domain/community/user/providers/UserProvider/UserProvider.tsx |
- Added import for filterAndMapEnabledEntitlements . - Replaced inline filtering and mapping of entitlements with a call to the new utility function. |
src/domain/license/plans/utils/filterAndMapEnabledEntitlements.ts |
- Introduced new utility function filterAndMapEnabledEntitlements to filter and map enabled entitlements. - Added type Entitlement and exported both the type and function. |
useInnovationFlowSettings
hook, which may interact with the authorization logic in the main PR by affecting how templates are imported and managed.useInnovationFlowSettings
hook, potentially impacting the same areas of template management and authorization as the main PR.Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Documentation