Skip to content

Commit

Permalink
ENH Update code to reflect changes to LeftAndMain
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Dec 8, 2024
1 parent 8a893c8 commit 578e0da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Extensions/ShareDraftContentControllerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class ShareDraftContentControllerExtension extends Extension
public function MakeShareDraftLink()
{
if ($member = Security::getCurrentUser()) {
if ($this->owner->hasMethod('CurrentPage') && $this->owner->CurrentPage()->canView($member)) {
return $this->owner->CurrentPage()->ShareTokenLink();
if ($this->owner->hasMethod('currentRecord') && $this->owner->currentRecord()->canView($member)) {
return $this->owner->currentRecord()->ShareTokenLink();
}
if ($this->owner->hasMethod('canView') && $this->owner->canView($member)) {
return $this->owner->ShareTokenLink();
Expand Down

0 comments on commit 578e0da

Please sign in to comment.