Properly enforce project visibility (also for entities and relations).