geosolutions-it/geonode

The user with edit permission cannot save the changes made

Closed this issue · 11 comments

Expected Behavior

The user with edit permission can save changes made on map and geostory

Actual Behavior

The user with edit permission cannot save the changes made on map and geostory.
Error on console:

PATCH https://stable.demo.geonode.org/mapstore/rest/resources/3227/?full=true 403 (Forbidden)

Steps to Reproduce the Problem

  1. Login as admin
  2. Create a map/geostory
  3. Enable the edit permission for a user
  4. Login with the user credential
  5. Open the map/geostory
  6. Edi it
  7. Click on Save

Specifications

  • GeoNode version:
  • Installation method (manual, GeoNode Docker, SPCGeoNode Docker):
  • Platform:
  • Additional details:

I could reproduce it and I see some problems.

@afabiani this map has full edit permission for some users. I added myself too for a test. W hen opening the page as one of those users the request to the security/permissions API returns 401

What's going on?

If you want to allow a user to change a map or geostory configuration, currently the only way is to make it owner of it. There's no way from the gui to allow write permissions on such resources

image

@ElenaGallo what do you mean by "The user with edit permission can save changes made on map and geostory"? How did you set those permissions? Maybe you refer to "change" permissions?

@giohappy @afabiani
when as a user I have not allowed to edit (only view), the Edit Tools panel is not available and by opening the geostory it is only possible to save as a new gesotory (save as button), see gif below:
view

When as a user I have the possibility to edit, the Edit Tools panel is available and by opening the geostory there is the possibility to save the gesotory (save button) but an error occurs, see gif below:
edit

@afabiani I confirm that on geostory I get an error as a user with manage permissions:

  1. geostory
  2. Edit
  3. Save
  4. PATCH 403 Forbidden

@ElenaGallo we confirm that the Save action is forbidden at the moment for non-admins and non-owners on maps, geostories (and I guess dashboards too). This is probably a regression affecting all versions.

I'm going to open an issue for that asap.

Issue created GeoNode#8232

@ElenaGallo plese test again on development. I'm going to update stable asap.

@giohappy Test passed on development

@ElenaGallo stable is updated, please test it too.

@giohappy Test passed even on stable.