Restrict access to contact based on allowed companies
There is a record rule for model “Contact” that separates contact books for each company:
And now if I’m a user with current company “A” I can see only contact info for users with current company “A”.I would like to change it so that if I’m a user with current company “A” I can see contact info of all the users that have company “A” in theirs Allowed company (rather that only current company).
How do I do this? As far as I can see Contact model does not hold information about Allowed companies and have only current company.