The Dynamic Entity Access module provides a powerful framework for programmatically controlling access to entities combining taxonomy access control, organic groups and domain access.
Given you build something like a Drupal distribution containing of several submodules, for example managed via features, there is one major problems, how do you manage permissions.