Problem/Motivation
The module just hides a form button, but the actual access to the "preview route" isn't changed.
This is probably mitigated by the fact that the preview route involves a uuid, but there's an actual access handler for this specific operation, so we should probably be altering it.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3383501-access-check.patch | 2.77 KB | gcb |
Issue fork node_preview_permissions-3383501
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
gcbComment #4
bobooon commentedGood callout! I went a different route with the implementation, however. Instead of overriding the existing
access_check.node.previewservice the module provides it's ownaccess_check.node.preview_permissionsservice. Drupal registers every access check provider using theapplies_toproperty. If either theaccess_check.node.previeworaccess_check.node.preview_permissionsaccess checker returns forbidden the preview route responds with access denied. Furthermore, the new service is used to set the preview button element access.