Users and Permissions Plugin: How to assign multiple roles to single end-user

You can find the schema.json of ‘users-permissions’ plugin at path src/extensions/users-permissions/content-types/user. the you can modify the user-role relation to ‘manyToMany’

"role": {
      "type": "relation",
      "relation": "manyToMany",
      "target": "plugin::users-permissions.role",
      "inversedBy": "users",
      "configurable": false
    },

and save, waiting server restart. then you can add a user to many role.
Though you can modify it, I think it is hard to manage the relationship between manyToMany, it will be a mussy maybe.
Add a new field to manage the permission maybe better I think.

1 Like