Default Filter Does Not Respect User Roles
| Project: | Default Filter |
| Version: | 5.x-2.0 |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs review |
Jump to:
I believe this applies to both 5.x-1.x and 5.x-2.x but I am specifically talking about 2.x.
Okay so I was having a heck of a time getting this module to work like I thought it was was supposed to. I have used this module on a ton of sites, and just now discovered that it disregards the current user's roles when determining a default filter. This is a HUGE bug and I cannot believe it has been overlooked, or maybe I am just completely missing something.
I had two roles which have the Full HTML format, and the Filtered HTML format is the global default. On a certain node form, I need the default format to be Full HTML for one role, and Filtered HTML to be the default for the other. This is exactly what this module is supposed to provide for, but when I would set a default for one role, the other role would also inherit the default.
If you look at the the function "default_filter_retrieve" you will see it grabs the current user's roles with the following code, but the variable that the roles are stored in is not referenced anywhere in the function except in a line that has been commented out.
Uncomment this line (line 270 of default_filter.module,v 1.9) , and comment out the following line (line 271) to resolve this issue.
This should certainly be addressed and resolved in the modules downloadable packages ASAP.
A patch is also attached.
| Attachment | Size |
|---|---|
| default_filter.module.patch | 1.45 KB |

#1
I took a peek at the code for version 5.x-1.x-dev and it has the same issue.