Skip to main content

The admin panel RBAC system has been updated

In Strapi 5, the content-manager_rbacManager, which is a section of Strapi's redux store for the admin panel, is removed and the regular permissions system is used instead. Additionally, the useRBAC hook is updated.

This page is part of the breaking changes database and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

🔌 Is this breaking change affecting plugins?Yes

Breaking change description

In Strapi v4

Permissions are handled with the content-manager_rbacManager section of the redux store, like in the following generic example:

const cmPermissions useSelector(state => state['content-manager_rbacManager'])
const { allowedActions } = useRBAC({
main: [{ action: 'admin::something.main', subject: null }]
})

const canMain = allowedActions.canMain

In Strapi 5

content-manager_rbacManager is removed and the regular permissions system is used instead, which implies the useRBAC hook is used differently, as in the following generic example:

const { allowedActions } = useRBAC([
{ action: 'admin::something.main', subject: null }
])

const canMain = allowedActions.canMain

Migration

This section regroups useful notes and procedures about the introduced breaking change.

Notes

Manual migration

Plugin developers that are hooking into the redux store to tweak RBAC permissions in Strapi v4 need to update their code according to the described changes.