| @@ 112-122 (lines=11) @@ | ||
| 109 | * |
|
| 110 | * @return bool can see |
|
| 111 | */ |
|
| 112 | public function canView($user) |
|
| 113 | { |
|
| 114 | if ($user->can('setFlowContent')) { |
|
| 115 | return true; |
|
| 116 | } |
|
| 117 | if ($user->can('setOwnFlowContent') && in_array($user->identity, $this->flow->users)) { |
|
| 118 | return true; |
|
| 119 | } |
|
| 120 | ||
| 121 | return false; |
|
| 122 | } |
|
| 123 | ||
| 124 | /** |
|
| 125 | * Get raw data and transform it to content type specific needs. |
|
| @@ 150-160 (lines=11) @@ | ||
| 147 | * |
|
| 148 | * @return bool can see |
|
| 149 | */ |
|
| 150 | public function canView($user) |
|
| 151 | { |
|
| 152 | if ($user->can('setFlowContent')) { |
|
| 153 | return true; |
|
| 154 | } |
|
| 155 | if ($user->can('setOwnFlowContent') && in_array($user->identity, $this->users)) { |
|
| 156 | return true; |
|
| 157 | } |
|
| 158 | ||
| 159 | return false; |
|
| 160 | } |
|
| 161 | } |
|
| 162 | ||