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