You are here

function webform_access in Webform 6.2

Same name and namespace in other branches
  1. 5.2 webform.module \webform_access()
  2. 5 webform.module \webform_access()

Implementation of hook_access().

File

./webform.module, line 425

Code

function webform_access($op, $node, $account) {
  switch ($op) {
    case 'create':
      return user_access('create webforms', $account);
    case 'update':
    case 'delete':
      if (user_access('edit webforms', $account) || user_access('edit own webforms', $account) && $account->uid == $node->uid) {
        return TRUE;
      }
  }
}