Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
workflow
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
workflow
Commits
0d07dba2
Commit
0d07dba2
authored
12 years ago
by
Nancy Wichmann
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#785194
by NancyDru: Better access to tab form.
parent
18ab8405
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
workflow.module
+0
-5
0 additions, 5 deletions
workflow.module
workflow.pages.inc
+5
-0
5 additions, 0 deletions
workflow.pages.inc
with
5 additions
and
5 deletions
workflow.module
+
0
−
5
View file @
0d07dba2
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
workflow.pages.inc
+
5
−
0
View file @
0d07dba2
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment