- πΊπΈUnited States daniel korte Brooklyn, NY
Iβm changing this to a Bug Report since I would expect this behavior from the
view own unpublished media
permission, but let me know if Iβm wrong here.I cleaned things up and addressed comment #12 concerns. Also, I noticed the existing patches donβt apply to the Media Library Grid/Table Widget which also has this issue. I updated the Views config to mirror what is being used on the Media Library admin page with the
media_status
plugin. Everything appears to be working with theview own unpublished media
permission now. - Status changed to Needs work
10 months ago 4:44am 23 March 2024 The Needs Review Queue Bot β tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request β . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
- Status changed to Needs review
10 months ago 4:58am 23 March 2024 - Merge request !7167Fix media selection with the 'view own unpublished media' permission β (Open) created by daniel korte
- Status changed to Needs work
10 months ago 5:30am 23 March 2024 The Needs Review Queue Bot β tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.
- Status changed to Needs review
10 months ago 6:22pm 23 March 2024 - Status changed to Needs work
10 months ago 3:12pm 24 March 2024 - πΊπΈUnited States smustgrave
Unsure, maybe another permission to check when the user doesn't have "administer media" permission.
Don't think this matches the solution in the MR
As a bug will need a failing test case showing the issue.
This appears to not only be limited to referencing a users own unpublished media. We have also experienced users not being able to reference unpublished media from other users. In this case, the user has the permissions to 'create media' and 'update any media'.
- π³πΏNew Zealand ericgsmith
Related issue π User can't reference unpublished content even when they have access to it Needs work is talking along similar lines but for content, not media. To me this feels like a shared issue around unpublished entities being hidden from users who have access to them.
- π³πΏNew Zealand ericgsmith
I think similar to the related issue - this check should also take the permission
view any unpublished content
into account since view any unpublished content also applies to media π 'View any unpublished content' permission is surprisingly broad ActivePerhaps this is realistically postponed until π User can't reference unpublished content even when they have access to it Needs work lands so that the BC impact can be the same, once that config in the related issue is added it can be used here>
- π³πΏNew Zealand ericgsmith
I have started expanding test coverage for the selection handler - end of the day for me so assigning to me, still need find where the validate new references is tested.
Added additional permission check mentioned in #28 - have not added this to the validate method yet - that is still to be done.
I still believe this will need to wait for π User can't reference unpublished content even when they have access to it Needs work to land as that introduces a BC layer for this logic change to the base handler - I think it makes sense to wait for that issue to land rather than trying to work that in now and likely this could be postponed as a follow up - but I will try complete the remaining work soon as I need this functionality now and do not have a concern about it being a BC break.
- π³πΏNew Zealand ericgsmith
I have expanded some tests - from a quick look I couldn't find existing tests covering the new entities behaviour - the validation constraint looked to be the appropriate place to add that.
Once π User can't reference unpublished content even when they have access to it Needs work lands with the
include_unpublished_entities
setting on the base handler that can be incorporated here. Setting to postponed based on that.