Tweak to structure

This commit is contained in:
Jono Menz 2022-07-06 10:49:06 -07:00 committed by GitHub
parent a6d17e69fb
commit 4a66918833
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -113,6 +113,7 @@ class BetterNavigatorExtension extends DataExtension
} }
// Only show edit link if user has CMS access // Only show edit link if user has CMS access
$editLink = null;
if($isDev || Permission::check('CMS_ACCESS_CMSMain')) { if($isDev || Permission::check('CMS_ACCESS_CMSMain')) {
// Check for edit link override, e.g. for a DataObject // Check for edit link override, e.g. for a DataObject
if(method_exists($this->owner, 'BetterNavigatorEditLink')) { if(method_exists($this->owner, 'BetterNavigatorEditLink')) {
@ -123,8 +124,6 @@ class BetterNavigatorExtension extends DataExtension
&& ($isDev || $this->owner->dataRecord->canEdit()) && ($isDev || $this->owner->dataRecord->canEdit())
? $nav['CMSLink']['Link'] : false; ? $nav['CMSLink']['Link'] : false;
} }
}else{
$editLink = false;
} }
// Is the logged in member nominated as a developer? // Is the logged in member nominated as a developer?