function _manualcrop_grant_crop_permission in Manual Crop 7
Grant the crop permission to all user roles.
2 calls to _manualcrop_grant_crop_permission()
- manualcrop_install in ./
manualcrop.install - Implements hook_install().
- manualcrop_update_7105 in ./
manualcrop.install - Grant the "Crop images" pemission to all user roles.
File
- ./
manualcrop.install, line 467 - Install, update and uninstall functions for the Manual Crop module.
Code
function _manualcrop_grant_crop_permission() {
foreach (user_roles() as $rid => $role) {
db_merge('role_permission')
->key(array(
'rid' => $rid,
'permission' => 'use manualcrop',
))
->fields(array(
'module' => 'manualcrop',
))
->execute();
}
}