I've got a Test User on a Salesforce License with the lowest Role possible using the Standard Profile. The OWD for Opportunity is set to Public Read Only
The OWD for Account is set to Public Read Only
The Owner of the Opportunity and its Account is a different user on a much higher role
There are no sharing rules on the Opportunity Object
There are no Sharing Overrides on Opportunity apart from System Administrator profile which has view all / modify all.
There are no Sharing Overrides on Account apart from System Administrator profile which has view all / modify all.
The Role the User is on is set to View All opportunities with accounts that they own. However they don't own the Account in question so it should have no impact.
I also tried making the Opportunity record owner be in a totally unrelated role so that the Test User is not included in Roles and Subordinates but that made no difference.
I then looked at the Sharing in Salesforce Classic for both the parent Account and the Opportunity record and saw no reason why the Test User should have edit rights on the Opportunity Record
I did a SOQL on the OpportunityShare table and that also verified no sharing rules giving the Test User access
I've re-calculating sharing rules multiple times and logged both myself and test user in and out multiple times.
I was thinking that Opportunity to Account is a special Salesforce Master Detail relationship but given there are no settings giving the Test User edit access on Account either that theory doesn't hold up.
What have I forgotten to check? Why does my Test User have edit rights on the Account and Contact? Is it because the record owner, who owns both records, is a Sys Admin?