StrapIO the ez to use socket.io configurator

is it global for the article model or a specific article instance?

its gobal, specific entites comes next.

1 Like

Hi @larsonnn!

I have Strapi v.3.6.8 and I am testing strapi-plugin-socket-io now.

There is one problem I haveā€¦ I tried to restrict access to only one Table from only one User. So, I have a table named ā€œtesttableā€ (itā€™s a collection name and there is a name of directory in strapi/api directory (strapi/api/testtable). Also I created a User named ā€œapi_techā€ with a role ā€œapi_accessā€ which has full access to api of the table ā€œtesttableā€.

Then according to your tips, I created a directory ā€œsocket-io/services/ā€ in ā€œextensionsā€ directory and there I created a file ā€œconfig.jsonā€ with following content:

{
  "routes": [
    {
      "testtable": "api_tech"
    }
  ]
}

But this configuration doesnā€™t work for me. And I didnā€™t see any errors or debugs (in debug mode). If I removed ā€œroutesā€ configuration, I get requested events (create, delete, update) from websocket without problemā€¦

What I do wrong in this config.json file?

Yeah I see, sry the description is missleading.

it shoud be

"routes": [ 
  { "apiName": "testtable"}
]

Thx, itā€™s work now for me. I understood now that there is a list of api (tables in most cases) which should return info about events against them (CREATE, UPDATE, DELETE) but not restrictions for real users :slight_smile: