You are here

protected function MembersActivity::hasAccess in Heartbeat 6.4

Same name and namespace in other branches
  1. 7 modules/heartbeat_og/streams/membersactivity.inc \MembersActivity::hasAccess()

hasAccess

Checks access for this stream.

Overrides HeartbeatAccess::hasAccess

File

modules/og_activity/membersactivity.inc, line 47

Class

MembersActivity
Class MembersActivity Concrete class to prepare messages for the current user and all of his/her relations.

Code

protected function hasAccess() {

  // if the user has access to this node (member or public group)

  //og_set_group_context($this->group);
  if (isset($this->group) && (og_is_group_member($this->group) || $this->group->og_private == 0)) {
    $this->_group_access = TRUE;
  }
  if (!isset($this->group)) {
    $this
      ->setError('We are not in a group context.');
  }
  return $this->_group_access;
}