Closed (fixed)
Project:
FAQ_Ask
Version:
7.x-1.0-alpha1
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Reporter:
Created:
13 Apr 2009 at 16:01 UTC
Updated:
2 Aug 2012 at 02:02 UTC
I allowed the "authenticates users" role to "ask question". When a simple authenticated user go to node/add/faq?ask=true he gets access denied.
Comments
Comment #1
claudiu.cristeaI assume that this should be enough... The standard FAQ module "create faq" permission is not something that I want to give to "authenticated users"...
Comment #2
orces commentedI have the same problem after taking all the steps here:
http://drupal.org/node/266823
Comment #3
claudiu.cristeaThere is a
faq_ask_access()hook defined in the module, but this function is not called.This is a blocker issue..
Comment #4
orces commentedSo how should this be solved?
Comment #5
claudiu.cristeaDowngrading to 6.x-1.x solved the issue... It's a 6.x-2.x issue...
Comment #6
ycwjjjj commentedsame issue I encountered
Comment #7
jim.tank.jr commentedSOLUTION OR WORK AROUND:
To allow users to Ask Questions, you must grant BOTH of the following permissions:
1. faq module.create faq
2. faq_ask.ask question
Comment #8
ycwjjjj commentedI tried to grant both of the permissions. However, the user of the granted role can also create a FAQ with answer field if they create new content of FAQ content type. It seems not the way we want to allow it happen.
Comment #9
jriedel commentedSubscribe.
I want anonymous people to ask a question, setting the permission needed means an anonymous person can not only ask, but gets a create content menu item as can creata faq and asnwer it at the same time.
It worked fine in the previous versions.
Comment #10
dpatte commentedsubscribe
Comment #11
stenjo commentedA workaround for me was allowing create faq to anonymous users and then hide the create content menu item. The url still works from
?q=node/add/faqbut you have to know about it and type it directly. May not be a good solution if you have a lot of users who should be able to create faq's outside FAQ-Ask but it works for me. This link can be bookmarked for those who should have the right to create pure FAQ nodes./Sten
Comment #12
stenjo commentedWith the workaround in #11 and the fact that this is related to #580592: Ask question needs create FAQ permission, this is no longer a critical issue.
There will probably not be a solution to this until there is a major rewrite involving a separate temporary content type for questions.
Comment #13
stenjo commentedWith the workaround in #580592: Ask question needs create FAQ permission this issue is closed.
Comment #14
escoles commentedShouldn't the status be 'postponed' rather than 'fixed'? The problem is not fixed, it's merely worked-around (and in a risky way).
Comment #15
soelver commentedI really don't see this as a solution.
Yes, it works, but it's not right to do it that way.
Hoping for a real fix :)
Comment #16
stenjo commentedYes, you are right.
As long as this being a workaround, it is not fixed.
Comment #17
sdsheridanSubscribe.
Comment #18
nitebreedSubscribing
Comment #19
tobedeleted commentedIt strikes me that without a proper fix to this issue this module is essentially broken, as I would imagine that a pretty common use case will enable anonymous users to ask a question, and I would guess that the vast majority of site owners will not wish to give these users rights to create an FAQ.
Comment #20
stenjo commentedI was hoping to find some time to implement a proper solution to this involving a separate intermediate content type for unanswered questions so that this problem will be taken care of.
It does not seem to be happening any time soon, so there is no reason why this issue should be assigned to me.
The module is in use at my own site with the current flaw - using workarounds. I guess the itch is not strong enough for me yet...
Please, any patch are welcome.
Comment #21
tryitonce commented... not very satisfactory the current status of the problem. I just spent quite a bit of time trying to fix it along the described lines here.
Then this happened on testing:
Solution: bin the faq_ask module??????????????
What a pity - such a nice module - great idea and so useful ................ very sad, indeed.
..........
Comment #22
kcarwile commentedI took a somewhat simpler way to fix this problem. Essentially, the node form should ALWAYS be configured to "ask a question" when somebody has the 'ask question' permission set... otherwise why would you set that permission?
To fix this problem, give your appropriate roles the 'create faq' and the 'ask question' permissions. Then add the following lines of code to faq_ask.module after line 164:
The result is that a user with the 'ask question' permission is always going to get the "ask a question" version of the node creation form.
Comment #23
jlea9378 commentedThe fix in #22 works a little TOO well. It applies to everyone since admins and experts are considered authenticated users and I have given anonymous and authenticated users the right to ask questions. A better fix would be:
This excludes everyone who has the Answer Question permission.
Comment #24
stenjo commentedThe issue in #21 is reported as a critical bug in #1052772: Removing "?ask=TRUE" from url let's user enter complete FAQ entry. Follow this for further comments.
Comment #25
tryitonce commented.... thanks for the link ....
Comment #26
tryitonce commented.... thanks for the link ....
Comment #27
olezhek commentedjlea9378
Didn't help me. It still says that anonymous user has no permissions to add a question.
Comment #28
jlea9378 commentedDo you have your permissions set properly? I have mine set so that:
Anonymous users can "Ask Question"
Authenticated users can "Ask Question"
Nobody else can (but they can create FAQ nodes)
Comment #29
nancydruThose two roles cover everybody.
Comment #30
jlea9378 commentedYou're right. My change to the code excludes people with the answer permission though.
Comment #31
olezhek commentedjlea9378
Thanks for your answer.
Yes, it was my mistake. I didn't set up permissions properly for the FAQ module.
Comment #32
stenjo commentedSeems like this issue will be better addressed in the upcoming D7 version as the permissions are finer grained and allows more control. Please help out testing the new dev version of this and it'll get there quicker :-)
Comment #33
stenjo commentedMoving this to D7 as I don't see it will be fixed in D6
Comment #34
stenjo commentedSeems like the original issue of this thread is resolved in D7?
Comment #35
tryitonce commentedThat would be rather disappointing. D6 will be around for quite some time to come.
With Drupal improving D6 has a much wider base than D5 and thus will be around for much longer with less need to upgrade ....
Comment #36
nancydru@tryitonce: But the noise from people wanting D7 support is drowning out the D6 people. I won't rule out this getting into D6, especially when it seems to be in D7. But you also have to realize that we maintainers are volunteers - we don't get paid for this, but our landlords still want their money on time.
Comment #37
stenjo commentedThis is getting a little blurry for me. Currently in FAQ Ask 6.x-2.2 it works like this:
If Anonymous users should be able to create unanswered questions then,
create faqandask questionanswer questionpermission goes to http://example.com/node/add/faq?ask=1 he will also not have the answer field but http://example.com/node/add/faq will reveal the answer field for the answer question user.The same applies to registered user with same permissions set.
Seems pretty watertight to me. Have I missed something?
In any case, this is not an issue in 7, so I'm closing this thread.
If there is an issue with the D6 still, I hope someone can add that to the issue queue for the correct D6 version of FAQ Ask, remembering to provide a good explanation why this might still be a problem.
Comment #39
ditcheva commentedI'm not sure why this was marked as 'fixed' above. I'm definitely still seeing the problem behavior in the 7.x version...
I definitely don't want to give 'create FAQ' permissions for those who are allowed to ask. The permissions to write FAQs will be given to a much, much smaller group of users.
I'm re-opening this because I don't believe it has been fixed yet. If I'm mistaken, just let me know. I'm using the latest recommended release.
p.s. I really like this module, by the way!
Comment #40
stenjo commentedIm not getting what the problem behaviour really is at this point. If you read my comment #37 I'm explaining how I understand the modules behaviour now.
How would you NOT give 'create FAQ' to people who are asking questions? The question is part of the FAQ entry and with the more granular permission settings in D7 that should not be a problem the same way it is in D6.
Keep in mind that even if you are allowing someone to create an FAQ, the node is not published unless an
author"expert" touches it.Comment #41
jlea9378 commentedI agree with Sten. It seems to work perfectly fine and logically in all of my tests.
Comment #42
ditcheva commentedHmmm, yes. I see your point! The name of the permission makes it difficult for a new user to want to give to those asking for faqs rather than creating them, but I do understand your point and why that's necessary. Sorry for prolonging the thread! I'm closing it.
Comment #43
jlea9378 commented