You are here

public function DriverBase::access in Forena Reports 8

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

Parameters

string $arg:

Return value

bool True indicates allowed access.

Overrides DriverInterface::access

1 call to DriverBase::access()
DriverBase::data in src/FrxPlugin/Driver/DriverBase.php
Return data based on block definition.

File

src/FrxPlugin/Driver/DriverBase.php, line 50
Class that defines default methods for access control in an DriverBase

Class

DriverBase

Namespace

Drupal\forena\FrxPlugin\Driver

Code

public function access($arg) {
  $obj_access = TRUE;
  $f = @$this->conf['access callback'];
  if ($arg) {
    if ($f && is_callable($f)) {
      $obj_access = $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'];
      }
      $obj_access = $this
        ->dataManager()
        ->blockAccess($block, $path, $arg);
    }
  }
  return $obj_access;
}