Skip to content

Related resources saving flow issues due to permission updates - Reuse dashboard code #2908

@offtherailz

Description

@offtherailz

Description

note the resources linked in this epic do not complete the epic yet.
When you save a map with detail card and/or thumbnails, related resources are not updated in terms of permissions. We should reuse both the resource form and observables/geostore.js used in dashboard (that are not afflicted by this bugs) to update the permission correctly to both related resources and main resource.
The metadata form should be reused also in the map viewer context, to allow the editor to change metadata and permission without having to go to the home page and re- search for the map.

Pros:

  • No orphan resources (thumbnails and detail cards)
  • No issues with permission of detail cards and thumbnails
  • Can Full Map metadata form inside map (as for dashboards)
  • Future maintenance (code shared)
  • Future similar resources can be managed in the same way
  • Users that can edit a map can also edit permission [TODO: avoid to remove own permission]

Draft Tasks:

  • Update featured maps and maps plugins to work like Dashboards plugin
  • Implement detail card support for dashboard (and maps)
  • Reuse modal form in the map context (Save/ Save as plugins)
  • Decouple currentmap reducer and reuse the logic of dashboard

Browser Affected
any

Steps to reproduce

  • Create a map with thumbnail or detail card
  • Save it
  • Update permission to grant edit access to a group (from home)
  • Access as a user of the group
  • Open developer tools
  • Try to change the thumbnail

Expected Result

  • The thumbnail is updated

Current Result

  • You will not be able to delete the old thumbnail (error from dev tools) you will create another resource instead, but the current is lost. Sometimes new thumbs or detail cards are not accessible from other users.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions