Home

>

Tools

>

Strapi

>

Releases

>

4.11.2

Strapi Release: 4.11.2

Tag Name: v4.11.2

Release Date: 6/21/2023

Strapi LogoStrapi

Open-source headless CMS built with Node.js. Provides developers with complete freedom in choosing their favorite tools and frameworks for frontend development.

TL;DR

Strapi v4.11.2 is a maintenance release that addresses several critical bugs, enhances RBAC functionality with relations, and introduces a new enterprise hook. This update improves webhook form detection, fixes route handling issues, and enhances TypeScript support for abstract services. The release also includes various code refactoring and dependency updates to improve the overall stability and developer experience.

Highlight of the Release

    • Fixed RBAC conditions with relations for better permission handling
    • Added useEnterprise() hook for better enterprise feature integration
    • Fixed webhook form dirty state detection
    • Improved TypeScript support for abstract services
    • Removed didReceiveAPIRequest event

Migration Guide

Removal of didReceiveAPIRequest Event

The didReceiveAPIRequest event has been removed. If your code relies on this event, you'll need to refactor it to use alternative methods for detecting API requests.

Breadcrumbs API Update

The release includes a refactor to use version 2 of breadcrumbs in anticipation of version 1 deprecation. If you're using custom breadcrumbs in your plugins or extensions, consider updating to the v2 API to ensure future compatibility.

Upgrade Recommendations

This is a maintenance release that fixes several important bugs and introduces some enhancements. It's recommended to upgrade to v4.11.2, especially if you're experiencing issues with RBAC conditions when working with relations, webhook form detection, or route handling.

The upgrade should be straightforward with minimal risk, as most changes are bug fixes and internal refactoring. However, if you're using the didReceiveAPIRequest event or custom breadcrumbs implementation, you'll need to update your code accordingly.

Bug Fixes

RBAC Conditions with Relations

Fixed issues with Role-Based Access Control (RBAC) conditions when working with relations. This ensures that permission checks work correctly when dealing with related content.

Webhook Form Dirty State Detection

Fixed the detection of whether a webhook form is dirty, ensuring the save button is properly enabled/disabled based on form changes.

Route Handling in registerAPIRoutes

Fixed handling of undefined routes in the registerAPIRoutes forEach loop, preventing potential errors when registering API routes.

TypeScript Support for Abstract Services

Made the abstract service type looser to allow unsafe calls, improving TypeScript support and developer experience when working with abstract services.

New Features

New Enterprise Hook

A new useEnterprise() hook has been introduced to better handle enterprise-specific features. This hook allows for cleaner code organization and better separation between community and enterprise features. The settings router has been refactored to use this new hook.

Workflow Stage Change Webhook Event

The review workflows system now emits webhook events when a workflow stage changes, allowing for better integration with external systems and automation based on content workflow status changes.

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

No specific performance improvements were highlighted in this release. The focus was primarily on bug fixes, enhancements, and code refactoring.

Impact Summary

Strapi v4.11.2 is primarily a bug fix and enhancement release that addresses several important issues while introducing some new features and code improvements.

The most significant impact is the fix for RBAC conditions with relations, which ensures proper permission handling when working with related content. This is particularly important for applications with complex content relationships and permission requirements.

The introduction of the useEnterprise() hook represents a step forward in how Strapi handles enterprise features, providing a cleaner separation between community and enterprise code.

For plugin developers, the removal of the didReceiveAPIRequest event and the move to breadcrumbs v2 API may require code updates, but these changes contribute to a more maintainable and future-proof codebase.

Overall, this release improves stability and developer experience while laying groundwork for future enhancements.

Full Release Notes

🔥 Bug fix

💅 Enhancement

  • [core:admin] POC: Add useEnterprise() hook; refactor settings router (#16871) @gu-stav

🚀 New feature

⚙️ Chore

  • [core:admin] refactor: use version 2 of breadcrumbs in anticipation of deprecation (#16981) @joshuaellis
  • [core:admin] Chore: Remove admin permission imports for menu hooks (#17036) @gu-stav
  • [dependencies] Chore: Bump nx from v15 to v16 (#17019) @gu-stav
  • [plugin:users-permissions] chore: remove history & clean up some U&P tests (#16992) @joshuaellis
  • [tooling] Chore: Cleanup eslint/front configuration (#16984) @gu-stav
  • [tooling] Chore: Auto-sort imports using eslint (#16985) @gu-stav

📚 Update and Migration Guides

  • General update guide can be found here
  • Migration guides can be found here 📚

Statistics:

File Changed300
Line Additions1,763
Line Deletions1,143
Line Changes2,906
Total Commits92

User Affected:

  • Benefit from fixed RBAC conditions with relations
  • Can now safely handle undefined routes in registerAPIRoutes
  • Have access to the new useEnterprise() hook for enterprise features
  • Can make unsafe calls for abstract services with improved TypeScript support

Contributors:

Marc-RoigConvlymofahsandependabot[bot]markkaylorjoshuaellisBassel17christiancp100jhoward1994