Problem/Motivation
Currently when there is no value set on an entity, workbench access allows access:
// If no value is set on the entity, ignore.
// @TODO: Is this the correct logic? It is helpful for new installs.
if (empty($entity_sections)) {
return AccessResult::neutral();
}
When configuring on an existing site, it is impractical to put all existing content into a section.
Proposed resolution
I can see an application for this behavior on a new site, so I suggest making this a configuration option.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 2895918-wa-new-setting-6.patch | 19.93 KB | agentrickard |
| #4 | 2895918-wa-new-setting-4.patch | 8.63 KB | agentrickard |
| #3 | Screen Shot 2017-07-19 at 12.06.12 PM.png | 42.9 KB | agentrickard |
| #3 | 28959180-wa-new-setting.patch | 3.57 KB | agentrickard |
Comments
Comment #2
ZenDoodles commentedComment #3
agentrickardHere's a patch that adds a new setting 'Deny access to unassigned content'.
Right now it defaults to 'off', which is the current behavior. We're in alpha, so it could be changed to 'on.'
This still needs a test, but the patch is ready for manual testing.
There is an update hook due to a settings schema change.
Comment #4
agentrickardAnd a new patch with Unit tests (!).
Comment #5
agentrickardThe only question left here is "should this behavior be turned on by default"?
I deliberately didn't do that because it is a behavior change from the current alpha.
Comment #6
agentrickardIt's the deprecated function calls throwing exceptions....
Comment #7
larowlanLooks good
Comment #8
agentrickard