Issue #2295469 by Cottser, dawehner | effulgentsia: Add support for static permission definitions with *.permissions.yml.
Issue #2213899 by dawehner, joelpittet: Remove global $user wherever possible (outside bootstrap and authentication) Round 2.