You are here

restws_test.module in RESTful Web Services 7

Same filename and directory in other branches
  1. 7.2 tests/restws_test.module

RESTful web services test module.

File

tests/restws_test.module
View 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

Namesort descending Description
restws_test_field_access Implements hook_field_access().