You are here

function authcache_example_custom_access in Authenticated User Page Caching (Authcache) 7

1 string reference to 'authcache_example_custom_access'
authcache_example_menu in modules/authcache_example/authcache_example.module
Implents hook_menu()

File

modules/authcache_example/authcache_example.module, line 32
authcache_example.module

Code

function authcache_example_custom_access($account, $op) {
  global $user;
  if ($op == 'edit') {

    // Allow user with sufficient permission to edit their or any authcache example block.
    return $user->uid && $user->uid == $account->uid && user_access('edit own authcache example block') || user_access('administer authcache example');
  }
}