You are here

function fasttoggle_node_promote_access in Fasttoggle 7

Check promote access to a node.

Parameters

object $obj: Object for which access should be checked.

Return value

int Return tristate access result.

2 string references to 'fasttoggle_node_promote_access'
fasttoggle_node_fasttoggle_available_links in ./fasttoggle.api.php
Get the list of potential links for an object type.
fasttoggle_node_fasttoggle_available_links in module/fasttoggle_node/fasttoggle_node.module
Implements hook_fasttoggle_labels().

File

module/fasttoggle_node/fasttoggle_node.module, line 121

Code

function fasttoggle_node_promote_access($obj) {
  global $user;
  return fasttoggle_allow_access_if(user_access("override {$obj->type} promote option") || user_access('promote posts') || user_access('promote own posts') && $obj->uid == $user->uid);
}