You are here

function revisioning_user_may_auto_publish in Revisioning 8

Same name and namespace in other branches
  1. 7 revisioning_api.inc \revisioning_user_may_auto_publish()

Return whether the user has permission to auto-publish the supplied node.

Auto-publish applies only for content types for which this feature has been activated on the content type form and only when "New revision in draft, pending moderation" is ticked also.

Parameters

object $node: The node object

2 calls to revisioning_user_may_auto_publish()
revisioning_node_presave in ./revisioning.module
Implements hook_node_presave().
revisioning_scheduler_form_node_form_alter in revisioning_scheduler/revisioning_scheduler.module
Implements hook_form_BASEFORMID_alter().

File

./revisioning_api.inc, line 199
API functions of Revisioning module

Code

function revisioning_user_may_auto_publish($node) {
  return variable_get('revisioning_auto_publish_' . $node->type, FALSE) && revisioning_user_node_access('publish revisions', $node);
}