Added the ability to explicitly forbid access to projects

This PR adds the ability to explicitly forbid access to given projects.

Fixes #3344 and #3345.