I am a junior faculty member at a research university. I am working with postdoc A on a project. Postdoc A's PI, Dr. B, works in the same university, but is affiliated with another department. Prior to starting the project, postdoc A and I have agreed that we would work on the project during their spare time. We did not inform Dr. B about this arrangement. When the project is about half-way done, Dr.B found out that A is working with me on the project. Dr.B approached me and told me that all postdoc A's projects have to go through them, and claimed that postdoc A could get fired by the school if the school found out that postdoc A is publishing papers without their PI.
My questions:
Is it true that all projects of a postdoc have to go through their PI (even if the research is conducted during the postdoc's spare time)?
Do I have the obligation to let Dr.B know about my collaboration with postdoc A, given that we agree to work on the project during A's spare time? (I know as a courtesy to a colleague, I probably should have informed Dr.B about it before the project starts...)
What can I do at this point to make sure postdoc A's career is not affected by this incident?