mirror of
https://github.com/jonom/silverstripe-betternavigator.git
synced 2024-10-22 14:05:51 +02:00
Fix Edit link not defined if no CMS access (#57)
In the situation that a user has draft site access but no CMS access they received a '$editLink not defined error'. This corrects that by defining it as false.
This commit is contained in:
parent
f55bcdadd8
commit
92416eceef
@ -113,6 +113,7 @@ class BetterNavigatorExtension extends DataExtension
|
||||
}
|
||||
|
||||
// Only show edit link if user has CMS access
|
||||
$editLink = null;
|
||||
if($isDev || Permission::check('CMS_ACCESS_CMSMain')) {
|
||||
// Check for edit link override, e.g. for a DataObject
|
||||
if(method_exists($this->owner, 'BetterNavigatorEditLink')) {
|
||||
|
Loading…
Reference in New Issue
Block a user