-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thoughts (in code) on the "Recent content" view #4
base: 8.x-1.x
Are you sure you want to change the base?
Conversation
- Displays all content - Uses the same columns in the block and page views - Adds view and delete links to the "Actions" column - Displays content titles as plain text when the user does not have view access It's relatively easy for users to be in a situation where they don't have view access to content, but they can edit the content: they may have all of the permissions for a specific content type, but only have the "View own unpublished" content permission.
In D7, that permission was provided by Workbench Moderation. In Drupal 8.2, it is provided by Content Moderation, and I think our path forward it to integrate with that module. (The identical permission is provided by Workbench Moderation.) If we want to go with View unpublished $type, I can see that, but otherwise we would leverage core. My feeling is that Workbench proper is just a UI, and should leave the permissions to other systems. |
See also https://www.drupal.org/node/273595 |
Ok, cool, I'm on board with that. What do you think about removing the "Published status or admin user" filter from the "All recent content" Workbench view? |
Well, we're technically not controlling View access, so there isn't a security issue here except for unpublished nodes. Perhaps that means we add a "security" warning to the Workbench permissions that indicates it will allow users to view unpublished lists. If we move the actions (edit | delete) to a column then it should be fine. I don't know that we need a "view" action there, though. |
…t viewing unpublished node titles.
3b78185
to
5c86646
Compare
Odd. I'm getting the following error on the All Content page view (but not in the Views preview). Using core 8.2.x (dev).
|
I was looking at #2733187 Unpublished content is not shown the other day and I started playing with the all recent content view a bit.
It's relatively easy for users to be in a situation where they don't have view access to content, but they can edit the content: they may have all of the permissions for a specific content type, but only have the "View own unpublished" content permission. Core doesn't provide a "View all unpublished" or a "View unpublished
$type
content" permission.The changes I made are:
Before:
After:
The problem here is that users get content in this listing that they can neither view nor edit--meaning perhaps it should be hidden all together. Would it make sense to add a views filter that emulates the core "Published status or admin user" filter, but also checks the user's permissions and see which types of nodes they have "edit any" access to? This would work for the base case, but I'm afraid that we run into the limitations of core node permissions right about now.
Also, and this might veer totally off track: would it make sense for Workbench to provide per-node-type
"view unpublished $type content"
permissions?