Attached is the D7 and D9 exports of one of the views on my site, "Content advanced" which provides a more robust interface for content moderators to find content.
The original view required the "Administer content" permission to access the View.
The converted view only requires "View published content"
This grants anonymous users access to the contents of the view, which may contain private/unpublished content. No thank you. :)
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | Screen Shot 2021-05-14 at 1.21.12 PM.png | 135.57 KB | webchick |
| #6 | PermNulltoAccessContent-3211486-6.patch | 648 bytes | sundhar |
| #3 | PermissionNull-3211486-3.patch | 625 bytes | sundhar |
| D9-views.view_.content_advanced.yml.txt | 15.55 KB | webchick | |
| D7-content_advanced-view-export.txt | 18.36 KB | webchick |
Comments
Comment #2
sundharHi webchick,
getPluginList method changed in viewsMigration plugin. Views::PluginList funtion not gives all defined plugins, example role access plugin, Its defined in user module. So, I change the rendering method to get view plugin list.
This issue related to https://www.drupal.org/project/views_migration/issues/3210462
It had solved with viewsFilterPlugins-3210462-7.patch (https://www.drupal.org/files/issues/2021-05-02/viewsFilterPlugins-3210462-7.patch)
Comment #3
sundharAssign 'administer nodes' permission if permission is null.
Comment #5
webchickHmmm. I wonder if there's another indicator we could look for here. For example, if permissions are null, AND there's no ->published = TRUE filter on the View? That seems like it would be more accurate to the intent.
It is strange that it's blanking out the perm altogether. Hm.
Comment #6
sundharHmm.. yes,
We change the permission to 'access content'.
And In D7 views module default access permission is 'access content'. programmatic created views has the access permission is null. so we assign the 'access content' permission. If the access permission is null.
Comment #8
webchickComment #9
webchickYES! :D Problem solved!