I have a content type I need an anonymous user to be able to create. I used the Check Permissions page under Workbench Moderation to verify the anonymous user role is a qualified author to author moderated content for that content type. But when I got to the add content page for that content type and I'm not logged in, I get access denied. The page works fine if I login with an authenticated user account.

Can anonymous users create content with Workbench?

Any ideas on how to troubleshoot access denied errors?

Comments

agentrickard’s picture

With Workbench Access, an account has to be assigned to a section in order for content to be created. This should not be true, however, if that content type is not set under access control -- that would be a bug.

The anonymous user role can be added to a section using the "Editors by Role" setting once the Anon role is given the permission "Allow all members of this role to be assigned to Workbench Access sections"

jh81’s picture

StatusFileSize
new30.59 KB

The content type is under access control.

The Check Permissions page verifies the anonymous user role has all necessary permissions. When I run the check for my content type for the anonymous user I get the message "The anonymous user role should be a qualified author.".

The anonymous user has the permission "Allow all members of this role to be assigned to Workbench Access sections" and shows up in the Roles section of Workbench Access. Under editors by roles, anonymous user is there and checked (see attached).

agentrickard’s picture

Project: Workbench Access » Workbench Moderation
Version: 7.x-1.1 » 7.x-1.x-dev

OK. Then this is a Workbench Moderation issue, since that's where the message is coming from.

Check the permissions for that module -- there is even a help screen for checking permission structures. See admin/config/workbench/moderation/check-permissions

jh81’s picture

StatusFileSize
new75.17 KB

Yes, I'm using that help screen for checking permissions. That's where I'm getting the confirmation message -> "The anonymous user role should be a qualified author." (see attached)

So if the permissions are correct according to workbench, then why am I getting access denied when an anonymous user goes to the create content page for that content type?

agentrickard’s picture

I don't know. Does the aonon user have permission to create any content types? Workbench Access never grants access to create content, it only denies.

jh81’s picture

Yes anon has the permission to create this content type. I've given up on Workbench being able to handle this scenario at this point. I removed the content type from Workbench and used the core Drupal capability to have anon create unpublished content by unchecking the Published button on the content type. Not great that I now have to create a view outside of Workbench to handle reviewing/publishing that content but it works. Thanks for the help.

agentrickard’s picture

Project: Workbench Moderation » Workbench Access

Well, I'm very interested in why this error is happening. Can you describe the configuration or take screen shots? Perhaps there is a bug in how we handle the anon role.

agentrickard’s picture

StatusFileSize
new42.09 KB

I was able to make this work very quickly for the anon role, though I am not using Moderation. Can this role create more than one content type?

jh81’s picture

StatusFileSize
new65.05 KB
new31.87 KB

On a clean Drupal installation with moderation and access control enabled I have the same problem. I've given the anon role all rights that are suggested on the Check Permissions page but still get access denied when I try to create new content as anon. For this test I've only enabled moderation for one content type (basic page) and the anon role can only create this content type. I've attached a couple screen shots.

agentrickard’s picture

Odd. The things to check here are:

* The anon role must have the "Basic page: Create new content " permission.
* The anon role must have the "Allow all members of this role to be assigned to Workbench Access sections " permission.
* The anon role must be assinged to at least one section at admin/config/workbench/access
* The basic page type must be configured for Workbench Access control at admin/config/workbench/access/settings

I cannot configure a fresh install to replicate this error.

jh81’s picture

* The anon role must be assigned to at least one section at admin/config/workbench/access

That was my problem. Its working now.

agentrickard’s picture

Status: Active » Closed (works as designed)

OK. I thought we had covered that in comment #2.

jh81’s picture

It works fine on my clean Drupal web site. I've gone back and reviewed all settings but it still does not work on the Drupal web site I developed that I need it to work on. At this point I'm done with troubleshooting and just need to move on without using Workbench for anon user in that site. Thanks for the help.