| Conditions | 6 | 
| Paths | 4 | 
| Total Lines | 11 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 20 | public function MakeShareDraftLink() | ||
| 21 |     { | ||
| 22 |         if ($member = Security::getCurrentUser()) { | ||
| 23 |             if ($this->owner->hasMethod('CurrentPage') && $this->owner->CurrentPage()->canEdit($member)) { | ||
| 24 | return $this->owner->CurrentPage()->ShareTokenLink(); | ||
| 25 |             } elseif ($this->owner->hasMethod('canEdit') && $this->owner->canEdit($member)) { | ||
| 26 | return $this->owner->ShareTokenLink(); | ||
| 27 | } | ||
| 28 | } | ||
| 29 | |||
| 30 | return Security::permissionFailure(); | ||
| 31 | } | ||
| 44 |