You are here

function _heartbeat_stream_has_access in Heartbeat 7

Helper function to check access on activity stream.

Parameters

HeartbeatStreamConfig $streamConfig: A Heartbeat stream configuration object.

2 calls to _heartbeat_stream_has_access()
heartbeat_stream in ./heartbeat.streams.inc
Prepares a heartbeat stream.
heartbeat_stream_has_access in ./heartbeat.streams.inc
Helper function to check access on activity stream by name.

File

./heartbeat.streams.inc, line 189

Code

function _heartbeat_stream_has_access($streamConfig = NULL) {
  if (isset($streamConfig) && $streamConfig instanceof HeartbeatStreamConfig) {
    return user_access('view heartbeat messages') && user_access('view ' . $streamConfig->name . ' stream');
  }
  return FALSE;
}