I am working on a new article and I submit it unpublished. It shows up on the menu for all to see, when normal users click on the link in the menu they get an access denied page. Can we check to see if a user has permissions to access a page, or that the page is published before adding it to the menu?
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | node.module.patch | 664 bytes | ngroot |
Comments
Comment #1
heine commentedComment #2
Anonymous (not verified) commentedAm I allowed to mark this as a bug?
Because of the security risk involved, this is a serious issue (IMHO).
See nodes:
http://drupal.org/node/130440
http://drupal.org/node/150313
Comment #3
jpoesen commentedConfirmed. This behaviour still accours, but I'm not in a position to decide whether this is by design or not.
Comment #4
chx commentedThere is simply no way this can happen with 6.x -- the very same access check is ran on the menu links when they are displayed and when they are visited. D5 suffers from this and I do not think there's an easy way fixing this.
Comment #5
Anonymous (not verified) commentedThere is now a module that fixes this:
http://drupal.org/project/remove_nonviewable_menu_items
Should be put into core on the 5.x branch.
Comment #6
Petuschki commentedit is still happening in version 5.5
and: after a user clicks on the link, gets the "access denied" page loaded, it is not possible to login anymore
"q=user"
only shows "Page cannot be found"
I find this very very unpractical ;=(
Comment #7
seanrAm I the only one who sees this as critical? If we don't want users to see content, it seems fairly obvious that they shouldn't see menu items for that content either. I shouldn't need a module to correct such obvious misbehavior - let's get this fixed.
Comment #8
Anonymous (not verified) commentedNo, you are not alone.
See #2 and #5.
Comment #9
ngroot commentedAdding a call to clear the menu cache in node.module when mass publish or unpublish is done seems to eliminate this behavior for me.
Comment #10
gpk commentedComment #11
gpk commentedCode style: actually there should be another space before the "cache_clear_all()".
Comment #12
tr commentedAccording to chx in #4 "There is simply no way this can happen with 6.x". This issue is only for Drupal 5.x. As Drupal 5.x is no longer supported, I'm marking this as won't fix.