Is it possible to have a role attached to a company

Hello,

in a similar solution than erpnext, we need to have several companies ( called Context in our use case) and let user have a different role per company.
I understand the feature User Permissions but it seems it won’t cover our use case. A simple example:

  • the user A has read/write access to clients defined for Company A
  • the user A has only read access to clients defined for Company B
  • the user A has no access at all to clients defined for Company C

It seems that the user permissions can “only” filter the record based on a column value but can’t change the access mode depending on this column ( ie read/write). The global requirement would be to have role linked to a company.
Is it correct ?