You are here

function forena_query_editor_access in Forena Reports 7.4

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

Access function based on data b.

Parameters

string $block_name: Name of block to check access on.

string $action: Determines type of block right to check.

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 69
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");
}