User roles: Create relationship between table and roles

System Information
  • Strapi Version: 4.1.5
  • Operating System: Ubuntu
  • Database: PostgreSQL
  • Node Version: 14.18.2
  • NPM Version: 6.14.5
  • Yarn Version:

Something that I was able do with version 3, I am not able to do with version 4.

I’d like to be create to create a relationship between one table (collection-type) and the user roles as part of our workflow process such that for a given stage we can define what role is required i.e. a stage has a user role, a user role has many stages.

In Strapi 3, it was called users-permissions-roles I believe.

Thank you!


I’m wondering exactly the same! do you have any update related with this?

I found a solution but i don’t know whether it’s the right way. According to the documentation ( Plugins extension - Strapi Developer Docs ) i create:

  1. a folder /extensions under /src
  2. a subfolder /users-permissions
  3. under /users-permissions i create the strapi-server.js file
    The content of strapi-server.js is as follows:
module.exports = (plugin) => {

    plugin.contentTypes.role.schema.pluginOptions = {
        'content-manager': {
            visible: true,
        'content-type-builder': {
            visible: true,
    return plugin;

I hope it is the best way to reach the goal

Waiting for your feedback, thank you

1 Like