Include enabled modules in projects API (#17602).

Contributed by Jan Schulz-Hofen <jan@plan.io>

--HG--
extra : convert_revision : svn%3Ae93f8b46-1217-0410-a6f0-8f06a7374b81/trunk%4013363
Make 2nd parameter optional in User#allowed_to_globally? for consistency (#6498).

--HG--
extra : convert_revision : svn%3Ae93f8b46-1217-0410-a6f0-8f06a7374b81/trunk%4013364