Hi,
This patch let other users than the author of a Q/A select the best answer. To achieve this I add a new perm select best answer on any Q/A.
Along with this new perm I also let the user with uid = 0 select the best answer.
The behaviour of the module is not changed as the author of the Q/A is still able to select the best answer.
Regards,

CommentFileSizeAuthor
new_perm_for_select.patch1.19 KBec

Comments

ec’s picture

Status: Patch (to be ported) » Needs review

It may need some review before being ported ;-)

jcisio’s picture

Status: Needs review » Patch (to be ported)

Thanks. I've committed http://drupalcode.org/project/question_answer.git/commit/bfa9d8e.
(I changed permission name and also remove the $user->uid == 0 check - I don't understand why you want anonymous user to be able to select any answer.)

ec’s picture

Hi, thanks for committing. $user->uid ==0, is my big mistake!! I was thinking of the admin which uid=1. I think that we should have the admin always able to perform a selection, no?

jcisio’s picture

For uid == 1, we don't need that check, because user_access('anything') will be TRUE for admin.

ec’s picture

Ok good, so this check was really a big mistake! Thanks.

ec’s picture

Status: Patch (to be ported) » Fixed

Already committed, see #2.

jcisio’s picture

Status: Fixed » Patch (to be ported)

We need to port it to 7.x branch.

jcisio’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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