silverstripe/silverstripe-subsites — pull request #132 by mateusz (2014-01-09 20:57:25+00:00)
Title: Make canEdit fall back to session if the object's SubsiteID not there.

This problem manifests when a GridField-managed relationship tries to
create an object that references the container from canEdit - the
container in this case has empty fields.

An example of that is a HomePage with CarouselItem - if the
CarouselItem::canEdit tries to call $this->Page()->canEdit(), the "Page"
will be a dummy object, not the actual instance of the HomePage that's
doing the manipulation.