1 views_ui.module views_ui_menu_action_access($view, $action, $account = NULL)

Menu access callback to check access to various views operations.

File

core/modules/views_ui/views_ui.module, line 374
Provide structure for the administrative interface to Views.

Code

function views_ui_menu_action_access($view, $action, $account = NULL) {
  if ($action === 'delete') {
    $access = $view->storage === VIEWS_STORAGE_NORMAL;
  }
  if ($action === 'revert') {
    $access = $view->storage === VIEWS_STORAGE_OVERRIDE;
  }
  return $access && user_access('administer views', $account);
}