This is the Schema.
-
company(Parent collection) -
project(Collection to be restricted)
Has a Many-to-One relationship to company via the field:company_id. -
company_membership(Junctiontable) (Collection to be restricted)
Links company anddirectus_users. It defines the user’s role in the company via the field: role (possible values: admin, subadmin, member).
What I want to accomplish?
-
Only Company admin should be able to create a project, Company subadmin, member shouldn’t have access to
Createa new Project. -
Only Company admin should be able to create
company_membership. Currently any role (admin, subadmin, member) can add newcompany_membership