MINOR Using canView() instead of deprecated can('view') in ContentController (from r102909)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112070 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-10-13 01:46:33 +00:00
parent 64a561f96c
commit 83f117f58c

View File

@ -106,7 +106,7 @@ class ContentController extends Controller {
if(Director::redirected_to()) return;
// Check page permissions
if($this->dataRecord && $this->URLSegment != 'Security' && !$this->dataRecord->can('View')) {
if($this->dataRecord && $this->URLSegment != 'Security' && !$this->dataRecord->canView()) {
return Security::permissionFailure($this);
}
@ -279,7 +279,7 @@ class ContentController extends Controller {
// We might need to create a show in menu permission
if(isset($result)) {
foreach($result as $page) {
if($page->can('view')) {
if($page->canView()) {
$visible[] = $page;
}
}