mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-11-01 10:49:12 -05:00
Fixes #4902 by updating PhotoAssociationsController#destroy to look up photos and items directly rather than querying photo_associations table with PhotoAssociation.item. Updates authorization rules to allow photo association deletion if the current member owns the photo, owns or can edit/manage the associated item, or is an admin. Updates the view partial to render the delete link when the user can edit either the photo or item. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>