Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have permissions set as follows:
Ask a question: ANONYMOUS USER & AUTHENTICATED USER checked
FAQ: Create new content: ANONYMOUS USER & AUTHENTICATED USER checked
However when I go to the page where the user is supposed to be able to ask a question,
...drupal/node/add/faq?ask=TRUE
I get the message "You are not authorized to access this page."
I saw this was an issue in FAQ_ASK 6.x and thought it was resolved in 7.
Any ideas on how to get this working?
Comment | File | Size | Author |
---|---|---|---|
#9 | related_links-improve_node_acess_implementation-1881814-9.patch | 2 KB | -enzo- |
Comments
Comment #1
stenjo CreditAttribution: stenjo commentedIs the same thing happening for both anon and logged in users?
Comment #2
stenjo CreditAttribution: stenjo commentedI think the user needs to be able to "view own unpublished content" too for this to work. Is this set?
If not, does it fix the problem?
Comment #3
stenjo CreditAttribution: stenjo commentedAh, just realised. The user will be redirected to the faq-page if she does not have permission 'view own unpublished content'. If the permission to view the faq-page is not enabled, then you will have the error you describe here.
She should be able to post a question though. The redirect only happens after question is posted.
Anonymous users are always redirected to 'faq-page' after posting a question:
Comment #4
stinky CreditAttribution: stinky commentedGiving permissions to ""view own unpublished content" didn't help. You can see the behavior on
dev1.library.uaf.edu/faq-page and click "Ask Here"
Comment #5
stinky CreditAttribution: stinky commentedLogged in users can ask a question.
Comment #6
stenjo CreditAttribution: stenjo commentedHm, this is strange. My tests for anonymous user access works fine with the settings you describe. Would it be possible for you to give me a temporary user with access to the permission for this site? That will allow me to investigate further on this spesific issue.
Alternatively as a first step, do a screen dump of the permissions page and the faq settings pages.
Comment #7
stinky CreditAttribution: stinky commentedI just figured it out. It's a problem with the "related links" module. The "related links" module is messing with all permissions. Disabling this module for FAQs fixed the problem.
Comment #8
stenjo CreditAttribution: stenjo commentedI think we should let the people maintaining the related links module have a chance to look at this issue a little before we close it for good. It might help improve the quality of the module.
Comment #9
-enzo- CreditAttribution: -enzo- commentedHello guys.
Attached you can find a patch to resolve this issue, with this change the module will respect if the user have permissions to add/edit/create a node or not, to avoid to present links to create or enable to edit nodes without the proper rights.
The remaining problem is related with combination of permissions, if a content type was enabled to use related links, to add or edit that node the role have to have both permissions add/edit the node and enable to add related links.