You are here

function formassembly_access in FormAssembly 7

Access callback for fa_forms.

1 string reference to 'formassembly_access'
formassembly_entity_info in ./formassembly.module
Implements hook_entity_info().

File

./formassembly.module, line 294
Contains hooks implementations and callbacks to non-admin pages.

Code

function formassembly_access($op, $form, $account = NULL) {
  global $user;
  if (!isset($account)) {
    $account = $user;
  }
  switch ($op) {
    case 'create':
      return user_access('administer formassembly', $account);
    case 'view':
      return user_access('administer formassembly', $account) || user_access('view formassembly', $account);
    case 'edit':
      return user_access('administer formassembly');
  }
}