You are here

function fasttoggle_node_sticky_access in Fasttoggle 7

Check access to modify stickiness of 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_sticky_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 105

Code

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