it would be great to be able to have the option to auto-assign the editorial section based on the url context to free a "user-editor" from having to make a choice. is this possible? planned?

Comments

agentrickard’s picture

Version: 7.x-1.0-beta9 » 7.x-1.x-dev

What context can you glean from /node/add that would not be specific to a particular site workflow?

Syntapse’s picture

thanks for reply, i am a little unsure if my original question answered... i am referring to adding new content from the front end where the context will not be node/add when the user chooses to add context... maybe im not phrasing my question too well cos i just starting using the module... i'll spend a little more time and it may make sense...

agentrickard’s picture

That's fine.

The problem is that the normal context for adding content is "node/add", so if you are using something other than that, it's hard to provide a solution that works for 95% of users.

The selection is currently restricted to the user's assigned sections, but we already had a UX issue to ensure that we do not auto-select a value by default.

If you are comfortable writing code, it would not be hard to write something small for your particular site in a custom module.

Syntapse’s picture

...sorry... add 'content'...

michaelfavia’s picture

@agentrickard: FWIW I think he is looking for a "per content type" or "global" default section that all new content gets automatically assigned to when created (either through a hidden form element or a disabled or prepopulated form item (think: main site or general). It would imply disabling node creation of "access managed types" if the author doesn't have permission for that default section.

More importantly though i think it is highlighting that we might not know the correct way to approach a shared problem space with your module. Im just getting into workbench_access development here so i dont exactly know how well that fits the development model but i was cursorily looking for the same thing.

Imaginary usecase (OP please forgive if this isnt your case):

I have a site that is generally editable only by people of the role "Editors". Along come some people i trust to edit my site but only to edit a small section of the site (identified either by a menu structure or taxonomy term). We'll call them "section editors". i want to allow them to edit the content in that section with as little overhead and management of the rest of the site as necessary because that other content is constantly being created (both manually or with feeds) and making them all deal with "section assignments" seems burdensome and unnecessary from a laymans point of view.

We just wanted to use workbench access to give permissions to a small subset of users that they otherwise didnt have. Instead it seems that WA selectively negates some permissions your user would otherwise have based on your and the content in questions mutual assignment to a section in question.

I dont mean to inappropriately hijack the issue but i think this is what both the OP and i were looking for. I expected WA to deny editing to all content not in my assigned sections but it seems to only do so if it IS assigned to another section im not assigned to. This creates the need to assign all existing and new content to a "general section".

Perhaps you can tell us we are approaching the problem from the wrong angle or to go climb a tree if your prefer. ;)

Thanks, -mf

agentrickard’s picture

The behavior here -- ignoring section access rules if nothing is set on a node -- is deliberate and based on what people expect if they install the module on top of an existing site. We also have a feature to disable WA on a per-content-type basis.

The odd piece of logic, perhaps is this one in workbench_access_node_access().

  // Ignore nodes where workbench section is not set.
  // This is for sites that installed Workbench Access on top of existing
  // content. See drupal.org/node/1359552.
  if ($op != 'create' && empty($node->workbench_access)) {
    return NODE_ACCESS_IGNORE;
  }

In this case, the module falls through to core permissions, which in fact is what it does in all cases except DENY.

#1359552: Unassigned nodes cannot be modified by roles with standard Drupal node permissions

delacosta456’s picture

hi
i would like to suggest readers to be following this related issue https://www.drupal.org/node/1285110#comment-12338530 that may help solve those , Automatic , contextual assignment etc. desired cases that may be achieved with Rules modules when it will be correctly integrated

Thanks

agentrickard’s picture

Status: Active » Closed (won't fix)

7.x is closed.