- Issue created by @Katy Jockelson
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
You could write a custom module to auto assign a user to a section.
When you're auto creating the term, just call
\Drupal\workbench_access\UserSectionStorage::addUser
to auto add the user - πΊπΈUnited States Katy Jockelson
Thanks @larowlan. But is what I am reporting the expected behaviour? Like, shouldn't a node author always have permission to edit that node?
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
The module here would be returning neutral so perhaps check you've got 'edit own x content' permissions granted?
- πΊπΈUnited States Katy Jockelson
I was very hopeful when you said this, but alas, I have edit any and edit own on all the relevant nodes types for that user role.
Am I right in thinking that this module takes away, not grants?
It seems to me that you have to set the perms to 'edit any' (and 'edit own') and then as soon as the CT has the 'access term' attached, it denies everyone who is not assigned to the section.
Is that right? What is the default behaviour for the author? Any other ideas? - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Yeah you're right, you start with 'edit any' and then it takes away.
So I don't think there's a way out of the box for this to work the way you're hoping.
Happy to help guide on writing a custom module if you go down that route.
- πΊπΈUnited States Katy Jockelson
Thank you. I had a side-slack with agentrickard and came to the same conclusion.
I have someone who can help write the code to automatically assign the author to the section - and I'll be sure to report back. - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
I think its worth making this a feature request if we can incorporate the custom code in an opt-in/configurable fashion
- πΊπΈUnited States Katy Jockelson
@larowlan - great news! Do you need me to to anything to open this as a feature request? What do you think the timeline is on getting this into the codebase?
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
We can use this issue
To be clear I'm hoping your developer can share their code or work on the feature as a patch to the module, I'm not intending to write it, only to support adding it to the module
- πΊπΈUnited States Katy Jockelson
Ah I see. OK got it. I'll get back to you.
- πΊπΈUnited States agentrickard Georgia (US)
Cross-posting from π¬ Allow users to add nodes Closed: works as designed .
One option is to create a permission "Create and edit own content without assignment" that lets people bypass Workbench Access for content that they own.
You could do that in a custom module but would need to alter the existing hooks.