@@ 316-329 (lines=14) @@ | ||
313 | * @param Member $member |
|
314 | * @return boolean |
|
315 | */ |
|
316 | public function canView($member = null) |
|
317 | { |
|
318 | if (!$member) { |
|
319 | $member = Security::getCurrentUser(); |
|
320 | } |
|
321 | ||
322 | $extended = $this->extendedCan('canView', $member); |
|
323 | if ($extended !== null) { |
|
324 | return $extended; |
|
325 | } |
|
326 | ||
327 | // Assuming all that can edit this object can also view it |
|
328 | return $this->canEdit($member); |
|
329 | } |
|
330 | ||
331 | /** |
|
332 | * Can a user view pages on this site? This method is only |
|
@@ 409-421 (lines=13) @@ | ||
406 | return false; |
|
407 | } |
|
408 | ||
409 | public function canEdit($member = null) |
|
410 | { |
|
411 | if (!$member) { |
|
412 | $member = Security::getCurrentUser(); |
|
413 | } |
|
414 | ||
415 | $extended = $this->extendedCan('canEdit', $member); |
|
416 | if ($extended !== null) { |
|
417 | return $extended; |
|
418 | } |
|
419 | ||
420 | return Permission::checkMember($member, "EDIT_SITECONFIG"); |
|
421 | } |
|
422 | ||
423 | /** |
|
424 | * @return array |