Rules to not allow certain users to create certain records


I have a ‘fees’ table that has an ‘office_id’. This office_id is FK to the ‘office’ table and the office table has a ‘user_id’ which is FK to the ‘User’ table.

This way, only those with user_id in Office table can create new records for that office_id.

Am I able to put that in the rules function, so it automatically keeps this relationship, or do I need something extra - can anyone show any examples of this type of relationship, i’m sure its standard functionality for lots of models.