You are here

function forena_query_editor_access in Forena Reports 7.5

Same name and namespace in other branches
  1. 8 forena_query/forena_query.module \forena_query_editor_access()
  2. 7.4 forena_query.module \forena_query_editor_access()

Access function based on data b

Parameters

unknown $block_name:

string $action:

Return value

boolean

1 string reference to 'forena_query_editor_access'
forena_query_menu in ./forena_query.module
Implementation of hook_menu

File

./forena_query.module, line 66
Provides the ability to create saved queries and to test sql data blocks.

Code

function forena_query_editor_access($block_name, $action = 'create') {
  $block_name = str_replace('.', '/', $block_name);
  @(list($provider, $block) = explode('/', $block_name));
  return user_access("access {$provider} data") && user_access("{$action} {$provider} blocks");
}