function forena_query_permission in Forena Reports 7.5
Same name and namespace in other branches
- 8 forena_query/forena_query.module \forena_query_permission()
- 7.3 forena_query.module \forena_query_permission()
- 7.4 forena_query.module \forena_query_permission()
Implementation of hook_permission
File
- ./
forena_query.module, line 76 - 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::DataManager()->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;
}