function _salesforce_fieldmap_delete_revert_access in Salesforce Suite 7.2
Access callback for delete / revert operations. Only code-based, overridden maps can be reverted and only database-only maps can be deleted.
1 string reference to '_salesforce_fieldmap_delete_revert_access'
- salesforce_api_menu in salesforce_api/
salesforce_api.module - Implements hook_menu().
File
- salesforce_api/
salesforce_api.module, line 355 - Defines an API that enables modules to interact with the Salesforce server.
Code
function _salesforce_fieldmap_delete_revert_access($perm, $op = 'delete', $map = NULL) {
if (empty($map) || !is_object($map)) {
return FALSE;
}
switch ($map->type) {
case 'Normal':
return $op == 'delete' && user_access($perm);
case 'Default':
return FALSE;
case 'Overridden':
return $op == 'revert' && user_access($perm);
}
}