permissions for privatemsg_filter need to be improved.
nbz - February 2, 2009 - 02:45
| Project: | Privatemsg |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
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"?

#1
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.
#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
#4
Looks good now :)
#5
#6
Added a tag count check before adding the tag select form.
#7
Just to clarify exactly what this patch does:
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
homerun.
#11
Automatically closed -- issue fixed for 2 weeks with no activity.