Fix Edit link not defined if no CMS access

In the situation that a user has draft site access but no CMS access they received a '$editLink not defined error'. This corrects that be defining it as false.
This commit is contained in:
Howard Grigg 2022-05-24 15:53:44 +12:00 committed by GitHub
parent f55bcdadd8
commit a6d17e69fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -123,6 +123,8 @@ class BetterNavigatorExtension extends DataExtension
&& ($isDev || $this->owner->dataRecord->canEdit())
? $nav['CMSLink']['Link'] : false;
}
}else{
$editLink = false;
}
// Is the logged in member nominated as a developer?