Skip to content
Snippets Groups Projects
Commit 0d07dba2 authored by Nancy Wichmann's avatar Nancy Wichmann
Browse files

Issue #785194 by NancyDru: Better access to tab form.

parent 18ab8405
No related branches found
No related tags found
No related merge requests found
......@@ -44,11 +44,6 @@ function workflow_node_tab_access($node = NULL) {
return FALSE;
}
// View or update node access is needed to grant workflow access
if (!node_access('view', $node) || !node_access('update', $node)) {
return FALSE;
}
$roles = array_keys($user->roles);
if ($node->uid == $user->uid) {
$roles = array_merge(array('author'), $roles);
......
......@@ -117,6 +117,11 @@ function theme_workflow_deleted_state($state_name) {
* Form definition array.
*/
function workflow_tab_form($form_state, $node, $wid, $states, $current) {
// Let's make sure we should be here.
if (workflow_node_tab_access($node) === FALSE) {
return;
}
$form['#tab'] = TRUE;
$choices = workflow_field_choices($node);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment