silverstripe/silverstripe-subsites — pull request #130 by madmatt (2014-01-09 04:15:57+00:00)
Title: Allow ‘ADMIN’ and ‘CMS_ACCESS_LeftAndMain’ CMS access. Fixes CWPBUG-113

Previously, only the global ‘ADMIN’ permission was allowing users to bypass the stricter Permission check. We also need to allow the ‘CMS_ACCESS_LeftAndMain’ permission to bypass this check, as otherwise a user who is in a Group with the ‘Access to all CMS sections’ permission set (which only sets the CMS_ACCESS_LeftAndMain permission code and no others) would be denied access to the CMS for that sub site.

**Please peer-review this carefully - I believe I've checked that this isn't giving the wrong people permission to more than they should be able to access, but I can't be certain I've got all cases.**