silverstripe-labs/silverstripe-dms — pull request #39 by normann (2013-11-14 04:51:43+00:00)
Title: NEW best way to keep extended 'can' functions effected with DataObject's...

After checking File/SiteTree etc, found the logic in this patch is the best way to keep those 'can' functions in DataExtension objects effected with DataObject objects, but not overlooked.

Also DataExtension 's canView function signature is DataExtension::canView($member) , rather than DataExtension::canView(&$canView), so we have to make $this->extend() call, using $member, instead of $canView, in addition, return false immediately if one of the extended objects' 'can' function return a 'false' by checking the value of !min($results).