Closed (duplicate)
Project:
Privatemsg
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
3 Sep 2012 at 13:19 UTC
Updated:
29 Nov 2017 at 10:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
valderama commentedHere is the patch
Comment #3
valderama commentedI do not see any connection between the changes in my patch, and the tagging feature of privatemsg.
Maybe a real person could check again?
Thanks,
walter
Comment #4
valderama commentedI went a step further, and actually tried to verifiy the Test results.
I setup a clean D7.15 with privatemsg modules enabled, and tagging of threads actually worked - even ater applying my patch. So at least the first four failed tests, seem to be false.
I would be glad, if someone could review my patch.
Comment #5
-Mania- commentedThanks, works great! I didn't apply the patch as I don't know how to do it but I copied the changes manually.
Comment #6
ChrisValentine commentedSo - what's the status of this? At the moment my users can't read their messages because I can't display the messages Tab without them also being able to read everyone's messages - which is obviously way too open. How do I get Private messages to work properly?
Versions:
Drupal core: 7.19
Private messages: 7.x-1.3
Comment #7
marcoBauli commentedas a work around, i created a custom "Messages" tab on the user/* page (Views or template.php) and redirected the custom URL to /messages (.htaccess or redirection module). Not ideal, but good until this gets hopefully fixed.
Comment #8
ptmkenny commented#1: user-message-tab-1772236-2.patch queued for re-testing.
Comment #9
ptmkenny commentedPotentially related issue: http://drupal.org/node/1217280
Comment #10
ptmkenny commentedThe tests check out now, which is good. However, I think that if such functionality is going to be added to the module that there need to be simpletests added as part of the patch to ensure that users cannot read others' messages, etc.
Comment #11
Anonymous (not verified) commentedprivatemsg_list_page() already has the checks in it to make sure that if you don't have the 'read all private messages' permission, and the current user's uid doesn't match the uid of the messages you're viewing, you get MENU_ACCESS_DENIED returned.
Hoping this can get pushed along soon.
Comment #12
ptmkenny commented@rsmylski Yes, I understand that there are checks in various places in the module, but the test file also needs to be modified to test against these new changes. If we add a new way (access callback) to access messages, we need to make sure that not just now but in the future permissions are enforced properly, and adding tests is one way to do that.
Comment #13
ptmkenny commentedRe-roll #1 against 2.x-dev (since that is the new features branch) with preliminary tests. I'm not sure if hard-coding UIDs violates a best practice with respect to the tests, but it's a start anyway.
Comment #14
ptmkenny commentedComment #15
ptmkenny commentedComment #16
ptmkenny commentedAdditional related issues (both have patches that are not as far along):
https://drupal.org/node/1217280
https://drupal.org/node/1443172
Comment #17
ptmkenny commented#14: privatemsg-user-message-tab-1772236-13.patch queued for re-testing.
Comment #19
ptmkenny commentedRe-roll for latest dev
Comment #20
ptmkenny commentedClosed #1217280: Can't Change Privatemsg path in Admin settings anymore and #1443172: View own messages in 'user/%/messages as duplicates.
Comment #21
ptmkenny commentedAs is, this patch is suitable for admins to quickly check which private messages a user has sent, but the links (Inbox, Sent Messages) are not printed, so it is a poor interface for regular users.
Comment #22
berdirWhich is what I've been saying all along, yes :)
And which is why the initial patches in #1443172: View own messages in 'user/%/messages did not duplicate the interface, they simply redirect to /messages, which is a change that I was ok with. I'd suggest to invert the closed status and continue with #1443172-13: View own messages in 'user/%/messages
Comment #23
ptmkenny commentedIgnore message in error
Comment #23.0
ptmkenny commentedfixed typos
Comment #24
ptmkenny commentedAs per #22, closing this thread and re-opening #1772236: Make "Messages" Tab on own user pages available for users and "admins" with "read all messages" permission. I'm sorry I missed the previous comments.
Comment #26
jeremylichtman commentedNote that if "me aliases" module is enabled, then the $account_id value passed into the access callback is "me", rather than the account id. This causes the path /user/me/messages to fail with patch #19 applied.
I'm working on a patch for this.
Comment #27
jeremylichtman commentedSee attached patch re #26.
Comment #28
ptmkenny commentedComment #30
daffie commentedA quick review for the function privatmsg_tab_access
Why add the $user variable
Where do you check if the user is the admin user or has administer permission.
If a user has the permission "read all messages" that must imply that the user has the permission "read privatemsg".
Comment #31
jonhattanClosing per #22 and #24
Comment #32
jonhattan