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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@102909 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-15 00:09:36 +00:00 committed by Sam Minnee
parent f413c30d91
commit 0b44d49167

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;
}
}