Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
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
drupal
Commits
dae2bdbb
Commit
dae2bdbb
authored
19 years ago
by
Gerhard Killesreiter
Browse files
Options
Downloads
Patches
Plain Diff
#45988
, Nodes with menu items bypass node permissions system
patch by chx
parent
63b3fea2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
includes/menu.inc
+10
-0
10 additions, 0 deletions
includes/menu.inc
modules/node.module
+1
-1
1 addition, 1 deletion
modules/node.module
modules/node/node.module
+1
-1
1 addition, 1 deletion
modules/node/node.module
with
12 additions
and
2 deletions
includes/menu.inc
+
10
−
0
View file @
dae2bdbb
...
@@ -1210,6 +1210,16 @@ function _menu_append_contextual_items() {
...
@@ -1210,6 +1210,16 @@ function _menu_append_contextual_items() {
$new_items
[
$temp_mid
]
=
$item
;
$new_items
[
$temp_mid
]
=
$item
;
$temp_mid
--
;
$temp_mid
--
;
}
}
else
{
$mid
=
$_menu
[
'path index'
][
$item
[
'path'
]];
if
(
$_menu
[
'items'
][
$mid
][
'type'
]
&
MENU_CREATED_BY_ADMIN
)
{
$_menu
[
'items'
][
$mid
][
'access'
]
=
$item
[
'access'
];
$_menu
[
'items'
][
$mid
][
'callback'
]
=
$item
[
'callback'
];
if
(
isset
(
$_menu
[
'items'
][
$mid
][
'callback arguments'
]))
{
$_menu
[
'items'
][
$mid
][
'callback arguments'
]
=
$item
[
'callback arguments'
];
}
}
}
}
}
// Establish parent-child relationships.
// Establish parent-child relationships.
...
...
This diff is collapsed.
Click to expand it.
modules/node.module
+
1
−
1
View file @
dae2bdbb
...
@@ -946,7 +946,7 @@ function node_menu($may_cache) {
...
@@ -946,7 +946,7 @@ function node_menu($may_cache) {
'access'
=>
node_access
(
'view'
,
$node
),
'access'
=>
node_access
(
'view'
,
$node
),
'type'
=>
MENU_CALLBACK
);
'type'
=>
MENU_CALLBACK
);
$items
[]
=
array
(
'path'
=>
'node/'
.
arg
(
1
)
.
'/view'
,
'title'
=>
t
(
'view'
),
$items
[]
=
array
(
'path'
=>
'node/'
.
arg
(
1
)
.
'/view'
,
'title'
=>
t
(
'view'
),
'type'
=>
MENU_DEFAULT_LOCAL_TASK
,
'weight'
=>
-
10
,
'access'
=>
node_access
(
'view'
,
$node
)
);
'type'
=>
MENU_DEFAULT_LOCAL_TASK
,
'weight'
=>
-
10
);
$items
[]
=
array
(
'path'
=>
'node/'
.
arg
(
1
)
.
'/edit'
,
'title'
=>
t
(
'edit'
),
$items
[]
=
array
(
'path'
=>
'node/'
.
arg
(
1
)
.
'/edit'
,
'title'
=>
t
(
'edit'
),
'callback'
=>
'node_page'
,
'callback'
=>
'node_page'
,
'access'
=>
node_access
(
'update'
,
$node
),
'access'
=>
node_access
(
'update'
,
$node
),
...
...
This diff is collapsed.
Click to expand it.
modules/node/node.module
+
1
−
1
View file @
dae2bdbb
...
@@ -946,7 +946,7 @@ function node_menu($may_cache) {
...
@@ -946,7 +946,7 @@ function node_menu($may_cache) {
'access'
=>
node_access
(
'view'
,
$node
),
'access'
=>
node_access
(
'view'
,
$node
),
'type'
=>
MENU_CALLBACK
);
'type'
=>
MENU_CALLBACK
);
$items
[]
=
array
(
'path'
=>
'node/'
.
arg
(
1
)
.
'/view'
,
'title'
=>
t
(
'view'
),
$items
[]
=
array
(
'path'
=>
'node/'
.
arg
(
1
)
.
'/view'
,
'title'
=>
t
(
'view'
),
'type'
=>
MENU_DEFAULT_LOCAL_TASK
,
'weight'
=>
-
10
,
'access'
=>
node_access
(
'view'
,
$node
)
);
'type'
=>
MENU_DEFAULT_LOCAL_TASK
,
'weight'
=>
-
10
);
$items
[]
=
array
(
'path'
=>
'node/'
.
arg
(
1
)
.
'/edit'
,
'title'
=>
t
(
'edit'
),
$items
[]
=
array
(
'path'
=>
'node/'
.
arg
(
1
)
.
'/edit'
,
'title'
=>
t
(
'edit'
),
'callback'
=>
'node_page'
,
'callback'
=>
'node_page'
,
'access'
=>
node_access
(
'update'
,
$node
),
'access'
=>
node_access
(
'update'
,
$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