public function FrxDataSource::access in Forena Reports 7.4
Same name and namespace in other branches
- 7.3 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 41 - 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) {
$obj_access = TRUE;
$access = user_access('access ' . $this->name . ' data');
$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 = Frx::RepoMan()
->blockAccess($block, $path, $arg);
}
}
return $access && $obj_access;
}