If I have a scenario where there is a parent object and say 5 child objects, all linked via a master-detail relationship is there a way to use Apex sharing to add additional sharing to a child object when a record is saved, therefore adding to the master-detail sharing already defined? I realise I can't manually change sharing to child records but I believe Apex would allow that?
I want to be able to create the sharing using a user lookup field and Apex looks the only possibility. I want to give additional read or edit access to a child object but if possible still let Salesforce do the heavy lifting with the master-detail inbuilt functionality.
The main goal is to allow a core team access to everything using Profile/Permission sets. Then allow each member read access to their own records (not owned by them but assigned to them using a user lookup field) and in the same way give their manager access to read their own + their team records. 1 of the child records will be created by the team member so they will have create access to that via object security.
Is Apex Sharing the way to go to achieve this level of flexibility?