To me it looks like a bug, that the vertical tab with the book settings is not visible, despite of having the permissions 'administer book outlines' and 'show core Outline form element'.

the reason seems to be that node_access('view', $node) returns false, if the nid is 0 (which is the case when a new node is created).

So I suggest changing the code of the function "is_outline_access" from

function is_outline_access($node = NULL) {
  if (isset($node->nid) && ! _book_outline_access($node)) {    //_book_outline_access returns false here, even though user has sufficient permissions. (_book_outline_access calls node_access('view', $node), which return false, when creating a new node )
    return false;
  }
  return user_access("show core Outline form element");
}

to

function is_outline_access($node = NULL) {
  if (isset($node->nid) && ! user_access('administer book outlines')) {    
    return false;
  }
  return user_access("show core Outline form element");
}

using the changed function, the permissions are checked directly, which might be a better option here..

best,
walter

Comments

MarcElbichon’s picture

Will be ported to next release.
Thanks for you collaboration

valderama’s picture

cool.. i have update my d.o. profile then :) "contributed code"..

canadrian’s picture

I experience the same issue. The tab does not show on node create forms, but it does show on node edit forms.

MarcElbichon’s picture

Status: Active » Closed (fixed)

Commited in dev version

scottrigby’s picture

Project: Book made simple (Obsolete) » Book made simple
Version: 7.x-3.3 » 7.x-3.x-dev