I have custom web parts deployed in my SharePoint 2016 solution. Scope for web part features is web. I am facing a weird issue in sub site.
If I break inheritance in sub site and user does not have any permission on parent site, in this case user is getting access denied error in the sub site pages where custom web parts are added. Even if user has full control on sub site. Only time user is able to access the pages if I provide at least read access to user on parent site.
To narrow down the issue I created a new page on sub site and tried to add my custom web part on it. I did not get any web part available for the page, not even the content editor web part. Only site apps were available. And if I provide read access on parent site then I get all the available web parts on the sub site page.
Can anyone explain this behavior to me.