When users try to click on one of the 'unsnswered questions' links (their own) they get "access denied".

I thought maybe this was by design, but then I read in the documentation:

The user who created the question is also allowed to edit it until it's answered. (After that, standard FAQ permissions take over.)

It would be good if they could! (in case they see they made a typo, etc.)

Thanks
:)
Scott

Comments

nancydru’s picture

Assigned: Unassigned » nancydru

Well, they can if they have "edit faq" or "edit own faq" permission. But I see the flaw here. My intent was that they could edit it until it got answered (published) but then be controlled by FAQ permissions. I don't think it's working like that, as you point out. I'll have to see if there's a way to bypass the permission check.

nancydru’s picture

Status: Active » Postponed (maintainer needs more info)

Sorry for the delay.

I don't have a test site that is easily set up to check this. Can you go to line 54 and change

    return user_access('answer question') || user_access('edit_own_faq'); 

to:

    return user_access('answer question') || $user->uid == $node->uid; 

And then see if it fixes the problem, please?

nancydru’s picture

Status: Postponed (maintainer needs more info) » Patch (to be ported)

I've committed a fix to the 5.x-1.x-dev version. Please try it out and let me know so I can port it to the 6.x version.

webdrips’s picture

(Comment for 6.x) I thought I would also point out that if a user does have edit permission, they can also provide their own answer by accessing the post through the track tab on their user page.

Not sure if you were aware of this, so I thought I would point it out.

Personally, I think it is fine if they can't edit their question...I would think that should technically be the job of the "expert" anyway. (That is, the "expert" would typically re-word the question to some "website standard" or whatnot.)

Lastly, I believe according to the documentation for this module, users without permission to answer questions should not be able to see the question in the block. Is this not the case? Should I submit another issue for this?

Dan

nancydru’s picture

Thanks, Dan. No I wasn't aware of that because I've never used tracking on any of my sites. Guess I need to document this too.

Editing one's own question is for things like fixing typos or adding more information. I really would like it to work right, and I'm pretty sure others would too. That's what makes Drupal such a challenge sometimes: the wide variety of uses that people make of the same code.

nancydru’s picture

Status: Patch (to be ported) » Fixed

Committed to 6.x-1.x-dev.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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