mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
f413c30d91
commit
0b44d49167
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user