Idea is borrowed from #298502-6: Better access to another user's messages and slightly extended.

Instead of using our own disallow_anon function (actually, that one is only used on a single page), use a menu access callback to disallow anon users.

- Allows to set a permission, defaults to read privatemsg
- All menu items except admin page use _privatemsg_access
- privatemsg_block checks access too

Comments

berdir’s picture

StatusFileSize
new9.83 KB

Updated patch:

- renamed to privatemsg_user_access to remove the _ and avoid conflict with hook_access
- Incorporates #367743: Read tab should not show on messages/new/%, the privatemsg_view_access function does now use privatemsg_user_access
- replaced all user_access calls with privatemsg_user_access, also in pm_block_user and privatemsg_filter

litwol’s picture

Status: Needs review » Fixed

2 issues with 1 patch. /me likes.

committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.