function forena_query_permission in Forena Reports 7.4
Same name and namespace in other branches
- 8 forena_query/forena_query.module \forena_query_permission()
- 7.5 forena_query.module \forena_query_permission()
- 7.3 forena_query.module \forena_query_permission()
Implementation of hook_permission.
File
- ./
forena_query.module, line 79 - Provides the ability to create saved queries and to test sql data blocks.
Code
function forena_query_permission() {
$perms = array(
'build forena sql blocks' => array(
'title' => 'Build Forena Data Blocks using SQL',
'description' => 'Direct access to SQL should not be given without understanding of security ramifications',
),
'forena data security' => array(
'title' => 'Manage data security',
'description' => 'Allows to create new data queries and alter security on saved queries.',
),
);
foreach (Frx::RepoMan()->repositories as $repos => $conf) {
$name = $conf['title'] ? $conf['title'] : $repos;
$perms['create ' . $repos . ' blocks'] = array(
'title' => 'Create ' . $name . ' Data Blocks',
);
$perms['delete ' . $repos . ' blocks'] = array(
'title' => 'Delete ' . $name . ' Data Blocks',
);
}
return $perms;
}