function merci_restrictions_access in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.3
Implements access callback.
1 string reference to 'merci_restrictions_access'
- merci_restrictions_entity_info in merci_restrictions/
merci_restrictions.module - Implements hook_entity_info().
File
- merci_restrictions/
merci_restrictions.module, line 217
Code
function merci_restrictions_access($op, $entity = NULL, $account = NULL) {
/*
switch ($op) {
case 'view':
//case 'update':
//case 'create':
//case 'edit':
case 'delete':
$default = variable_get('merci_restrictions_default', NULL);
if ($entity->name == $default) {
drupal_set_message(t("This is the default merci restrictions and can't be deleted. Please change the default merci restrictions at <a href='!url'>admin/config/merci/merci-restrictions/settings</a> if you want to delete this one.", array('!url' => url('admin/config/merci/merci-restrictions/settings'))), 'error');
return false;
}
break;
}
*/
if ($op == 'view') {
return TRUE;
}
return user_access('administer all merci restrictions');
}