While the current revision of Trash does restrict access to the trash, as well as the action of moving a node to trash to users with "view trash" permissions, the tab itself is displayed to all users if the module is active. Only after clicking it will they recieve an "access denied" message.

Attached is for your consideration a patch that tries to fix this by checking the user's access rights in function _trash_move_tab_access. After applying it, the tab is only shown to users with "view trash" permissions.

CommentFileSizeAuthor
trash_tab_access.patch651 bytesbherlig

Comments

debe-2’s picture

hi,
where exactly should I add the attached code? I tried it to put it in trash.module but it was false. the module showed only nonsens after doint that...
please can anybody give me a hint where to add this code?
thanks,
debe

bherlig’s picture

debe -
this is not a code file that you can just place into the module's folder, it's a patch for changing an already existing file. Go to Drupal's applying patches page to learn how to do this (there's also a video there).

amateescu’s picture

Issue summary: View changes
Status: Active » Closed (outdated)