Seems like in Template.php, when evaluating if a user can edit a specific question/answer, the post_id is not being passed, returning always false.
Please let me know detail about this question, you can send me username & password of your site for further checking.
Why would you need my username & password?
THE BUG:
When deciding if showing edit & delete buttons, you’re not checking if the user has permissions to edit or delete that specific question/answer, instead, you’re only checking if the user has general edit/delete permissions.
WHERE:
Template.php > dwqa_question_button_action()
HOW IS RIGHT NOW:
“`php
if ( dwqa_current_user_can( ‘edit_question’ ) ) {
…
if ( dwqa_current_user_can( ‘delete_question’ ) ) {
…
“`
HOW IT SHOULD BE:
“`php
if ( dwqa_current_user_can( ‘edit_question’, get_the_ID() ) ) {
…
if ( dwqa_current_user_can( ‘delete_question’, get_the_ID() ) ) {
…
“`
Happening also in: Template.php > dwqa_answer_button_action()
Why would you need my username & password?… Exactly!
Any news?
Thanks
I have checked the Free version and see that this is a bug, we will check and update it in the next version. In this case, you can try with the following code:
http://snippi.com/s/7m6dl6y
http://snippi.com/s/f81fdd6
Please login or Register to submit your answer