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 Oct 17, 2024
1 parent c3550ae commit 41555d5
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 41555d5

Please sign in to comment.