This is a great module! Just what I was looking for to segregate contect based on user roles. However, there's one funny thing going on, and I'm not sure if it falls into the "feature" or "bug" category...
If a user has multiple roles, and a forum topic has access permissions for each of those roles, the forum topics are duplicated one time for each role for that user.
For example, if a user is set up with the following three roles:
1) authenticated user
2) contributor
3) developer
And a forum topic is created with access permissions for each of these roles, when the user visits the forums, it will
A) display "3 new" instead of "1 new" next to the forum title, although only one topic was created
B) display the topic three times in the forum
C) display the topic three times under "Active forum topics:" and "New forum topics:" if the forum topics block in enabled.
This does not seem to be the case for the main (admin) user login (that is, the first account created when setting up drupal). I can assign all of the roles to my admin login, and this does not occur. It is only an issue for subsequently created users.
Anyone know what I'm missing here?
Thanks!
Comments
Sounds like a bug
This is probably a bug, but not in the access module. It sounds like a bad query in the forum module instead. Please file an issue.
I think you may be right
I've been investigating this some more, and it appears that for each gid (user id or role id, depending on whether its node_privacy_byrole_user or node_privacy_byrole_role) with grant_view = 1 in the node_access table for a particular nid, that node will be displayed multiple times for each gid applicable to a given user.
For example, if a user is assigned 'role1' and 'role2', and both of those roles are given view access to a node, that node will be displayed twice for that user (at least if the content type is a forum topic, or an event in the event.module)
Also, if a user is assigned 'role1' and both node_privacy_byrole_role for that role is granted view access, and node_privacy_byrole_user for that user is granted view access, once again, the node will be displayed twice.
I'm not sure where the correct place to post this bug would be. It's not really a forum.module bug, as it only relates to the usage of a contributed module.
Any help in trying to track down what's going on would be appreciated.
In case anyone else is wonder
In case anyone else is wondering, this is being dealt with here:
http://drupal.org/node/11871