restws_test.module in RESTful Web Services 7
Same filename and directory in other branches
RESTful web services test module.
File
tests/restws_test.moduleView source
<?php
/**
* @file
* RESTful web services test module.
*/
/**
* Implements hook_field_access().
*
* @see RestWSTestCase::testFieldAccess()
*/
function restws_test_field_access($op, $field, $entity_type, $entity, $account) {
if ($field['field_name'] == 'field_text' && $op == 'edit') {
// Only allow edit access for a higher level permission.
return user_access('administer users', $account);
}
return TRUE;
}
Functions
Name | Description |
---|---|
restws_test_field_access | Implements hook_field_access(). |