You are here

public function FrxDataProvider::access in Forena Reports 6.2

Same name and namespace in other branches
  1. 6 FrxDataProvider.inc \FrxDataProvider::access()
  2. 7 FrxDataProvider.inc \FrxDataProvider::access()
  3. 7.2 FrxDataProvider.inc \FrxDataProvider::access()

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

Parameters

unknown_type $arg:

Return value

unknown

6 calls to FrxDataProvider::access()
FrxDrupal::data in plugins/FrxDrupal.inc
Get data based on file data block in the repository.
FrxFiles::data in plugins/FrxFiles.inc
FrxMSSQL::data in plugins/FrxMSSQL.inc
Get data based on file data block in the repository.
FrxOracle::data in plugins/FrxOracle.inc
Get data based on file data block in the repository.
FrxPDO::data in plugins/FrxPDO.inc
Get data based on file data block in the repository.

... See full list

File

./FrxDataProvider.inc, line 32
Class that defines default methods for access control in an FrxDataProvider

Class

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

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');
  }
}