openwisp / openwisp/openwisp-controller

[fix:ux] Read only view for JSON/dict fields in admin is not user friendly

Open
#848 6 comments 0 reactions 1 assignee View on GitHub

@pandafy is already working on this.

Since Jul 23, 2025.

enhancement
Dominant language
Python
Stars
773
Forks
315
Avg merge
2d 16h
Merged PRs (30d)
14

Description

The JSONSchema editor is not shown when the user only has view permission. This also hides the configuration of the device. Moreover, the configuration variables are shown as string representation of Python object:

Screenshot from 2024-04-02 00-47-09

This is not good for UX. We shall show the value of these fields as indented JSON in the UI when the user has read-only permission.

This issue affect both template and device admin pages.


This issue was first found in https://github.com/openwisp/openwisp-controller/pull/840#pullrequestreview-1923292713


PS added by @nemesifier, applies for:

  • device admin
  • template admi
  • vpn server admin
  • group variables and metadata
  • credentials, parameters:
    • if the user has view permissions because is member of the org, this should work as the other objects listed above
    • if a non superuser is viewing shared credentials, I think we should completely hide the parameters field both in admin and REST API

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.