Authenticated users are not able to create new teams or leagues even though I have granted the correct permissions.

Comments

ff1’s picture

This issue partially explains things: #789484: Confusing documentation for $node argument in hook_access()/hook_node_access()

So basically, if the $op is 'create', then $node could be just a string containing the node type.

To overcome this, we can copy the $type from node_content_access:

function node_content_access($op, $node, $account) {
  $type = is_string($node) ? $node : (is_array($node) ? $node['type'] : $node->type);
  // rest of the node access code...
}
ff1’s picture

Status: Active » Fixed

Commited.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.