| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function onBeforeWrite() |
||
| 41 | { |
||
| 42 | parent::onBeforeWrite(); |
||
| 43 | |||
| 44 | $allowed = [ |
||
| 45 | InheritedPermissions::LOGGED_IN_USERS, |
||
| 46 | InheritedPermissions::ONLY_THESE_USERS |
||
| 47 | ]; |
||
| 48 | |||
| 49 | if (!in_array($this->CanViewType, $allowed)) { |
||
| 50 | $this->CanViewType = InheritedPermissions::LOGGED_IN_USERS; |
||
|
|
|||
| 51 | } |
||
| 54 | } |