You are here

function scheduler_list_access_callback in Scheduler 6

Same name and namespace in other branches
  1. 7 scheduler.module \scheduler_list_access_callback()

Return the users access to the scheduler list page. Separate function required because of the two access values to be checked.

1 string reference to 'scheduler_list_access_callback'
scheduler_menu in ./scheduler.module
Implementation of hook_menu().

File

./scheduler.module, line 87

Code

function scheduler_list_access_callback() {
  $args = func_get_args();
  global $user;

  // If this is called from the user account page then allow the tab to be shown if you are
  // viewing your own account as an alternative to having 'administer nodes' permission.
  return (user_access('administer nodes') || $args[0] == 'user_only' && $args[1] == $user->uid) && user_access('schedule (un)publishing of nodes');
}