Download & Extend

permissions for privatemsg_filter need to be improved.

Project:Privatemsg
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Two things:

1. There is no permission to now allow users to filter by users - this seems to be available to all.
2. "create privatemsg_filter" seems to be a bad permission name. "create privatemsg_filter tags" would IMO be a better idea. Would this also need an update function to replace all the original permissions from whereever it is stored to the new one? is it worth the "pain"?

Comments

#1

Status:active» needs review

actually there is a permission for number 1, but it is not used. attached patch fixes that.

EDIT - a word of note - the number 2 from the above also applies to the delete permission. Both would read better if they had " tags" at the end of the permission names.

AttachmentSizeStatusTest resultOperations
privatemsg_filter.permissions.patch1.05 KBIgnored: Check issue status.NoneNone

#2

litwol and I talked about tags per user in IRC. If this is going to happen, we need to change/extend the permissions anyway.

#3

AttachmentSizeStatusTest resultOperations
privatemsg_filter_permission.patch1.06 KBIgnored: Check issue status.NoneNone

#4

Status:needs review» reviewed & tested by the community

Looks good now :)

#5

AttachmentSizeStatusTest resultOperations
privatemsg_filter.patch1.6 KBIgnored: Check issue status.NoneNone

#6

Status:reviewed & tested by the community» needs review

Added a tag count check before adding the tag select form.

#7

Status:needs review» reviewed & tested by the community

Just to clarify exactly what this patch does:

  1. Fixes bug where Privatemsg_filter ignores the 'use privatemsg_filter' permission;
  2. Only adds the tag selection form (beneath a message thread) if there are any tags available;

I've successfully applied the patch and tested both fixes. It works marvellously and is ready to be committed. :)

#8

This line in the conditional statement for privatemsg_filter_privatemsg_view_messages_alter assumes that tags are sitewide. Should i assume this will be patched once we commit the tags-per-user patch?

db_result(db_query('SELECT COUNT(*) FROM {pm_tags}'))

#9

The patch, in its current form, creates a new privatemsg_tag module, which is afaik a complete rewrite, so it will need to be patched anyway. But it might take some time until that is ready, while this is just a small fix to the current module.

#10

Status:reviewed & tested by the community» fixed

homerun.

#11

Status:fixed» closed (fixed)

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