You are here

public function FrxDataSource::access in Forena Reports 7.3

Same name and namespace in other branches
  1. 7.4 FrxDataSource.inc \FrxDataSource::access()

Implements the basic default security check of calling an access method.

Parameters

unknown_type $arg:

Return value

unknown

File

./FrxDataSource.inc, line 39
Class that defines default methods for access control in an FrxDataSource

Class

FrxDataSource
@file Class that defines default methods for access control in an FrxDataSource

Code

public function access($arg) {
  $f = @$this->conf['access callback'];
  if ($f && is_callable($f)) {
    return $f($arg);
  }
  elseif (isset($this->conf['access block'])) {
    $block = @$this->conf['access block'];
    $path = '';
    if (isset($this->conf['access path'])) {
      $path = $this->conf['access path'];
    }
    return FrxReportGenerator::instance()
      ->block_access($block, $path, $arg);
  }
  else {
    return user_access('access content');
  }
}