g3w-suite / g3w-admin

Server module for G3W-SUITE
https://g3w-suite.readthedocs.io/en/latest/g3wsuite_administration.html
Mozilla Public License 2.0
40 stars 34 forks source link

Hide columns by User/Groups doesn't works in editing mode #916

Open gisuser0 opened 3 months ago

gisuser0 commented 3 months ago

Checklist

Subject of the issue

With the "Hide columns by User/Groups" function it's possible to hide specific fields of a layer. It works with the info form and the attribute table but when the layer is in editing mode, the specific fields are visible and editable in the editing form.

Steps to reproduce

  1. Use the project of the online demo (https://g3wsuite.it/demo_3-8/)
  2. Create a new user "user1" and hide the field "address" of the layer "buildings" for this user

image

image

  1. Query the layer logged as superuser: the field "address" is visible

image

  1. Query the layer logged as "user1": the field "address" is not visible

image

5: Start the editing with the "user1": the field "address" is now visible and editable

image

Environment

Link to your project

No response

Additional info

No response

Raruto commented 2 months ago

Hi @gisuser0, thanks for the report.

Steps to reproduce

  1. hide some fields of a layer for a specific user/groups
  2. start the editing on that layer: the fields set as hidden are visible and editable

Please also add some self-explanatory images in the first comment to support debugging (ie. anyone else should understand this, not just core developers..).

👋 Raruto

Raruto commented 2 months ago

I think we are getting a bad server response (ref: editor_form_structure within initial config)

• Foo: Editor Level 1

image

• localhost:8000/api/config/1/qdjango/1?_t=1721996359.094077

image

image

👋 Raruto