function geocoder_services_permission in Geocoder 7.2
Implements hook_permission().
We define permissions for accessing geocoder over AJAX / services. There is one global permission which gives access to everything, and one permission per handler. The site-administrator can therefore fine tune which handlers are accessible. Note that to use AJAX with geocoder these permissions need to be set.
File
- modules/
geocoder_services/ geocoder_services.module, line 16 - Geocoder Services module.
Code
function geocoder_services_permission() {
$perms = array(
'bypass_geocoder_services_access' => array(
'title' => t('Bypass geocoder access control'),
),
);
foreach (\Drupal\geocoder\Geocoder::getPlugins('Provider') as $plugin_id) {
$perms['geocoder_services_plugin_' . $plugin_id] = array(
'title' => t('Can geocode using @plugin_id through AJAX / service', array(
'@plugin_id' => $plugin_id,
)),
);
}
return $perms;
}