Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show policy imports in Ditto explorer UI #1700

Closed
thjaeckle opened this issue Jul 20, 2023 · 4 comments · Fixed by #1793
Closed

Show policy imports in Ditto explorer UI #1700

thjaeckle opened this issue Jul 20, 2023 · 4 comments · Fixed by #1793
Assignees
Labels
UI Issues related to the Ditto explorer UI
Milestone

Comments

@thjaeckle
Copy link
Member

The Ditto explorer UI does not yet show policy imports for Policies.
It would be good to show them and to be able to navigate to an imported policy by clicking on it.

@thjaeckle thjaeckle added the UI Issues related to the Ditto explorer UI label Jul 20, 2023
@thfries
Copy link
Contributor

thfries commented Jul 30, 2023

Hi @thjaeckle,

I started to work on that. The UI to maintain policy imports is getting crazy.

One question: Is there a good reason for the UI to edit individual parts of a policy with narrowed REST calls (like putting a single subject of a policy entry)? Otherwise it would be much easier just to offer an ace editor for the full policy json.

Thanks for your opinion.

@thjaeckle
Copy link
Member Author

@thfries awesome, great to hear that.
For the explorer UI it should be sufficient to always read and update the complete policy.
Partial changes are nice to have, but not really required.

It would be kind of mandatory to have if you eg only have permissions to WRITE a specific part of a policy like a single entry or only subjects of an entry.
But I would see the UI as Admin UI where you probably most of the times work with unrestroctef permissions.

@thfries
Copy link
Contributor

thfries commented Aug 6, 2023

Here are my thoughts on the layout:
image

  • I kept the editors for the partial update of a policy so that you can select the imported policyIds and navigate (may be double click to navigate, single click to select/deselect for editing)
  • Added a second tab for the full json edit (like for things and environments). This also would allow to create a new policy
  • Policy entry allows to edit the importable. (drop down with implicit, explicit, never and null)
  • "Recent Policy" might be helpful to navigate in back and forth between policies. Clipboard copy would allow to create a new import

@thjaeckle
Copy link
Member Author

Hi @thfries
Your proposal on the layout looks very good and makes sense from my point of view.

The idea about the recent policies is also good.
The community is currently working on a policy search in PR #1698, maybe this can, in the future, be also used for browsing policies with a search slot.
But for now (and the policy search is a rather big topic which will probably take longer), your approach is the best we can do.

Regarding double click vs single click : I don't like that too much, as this is not really intuitively usable.
Maybe we could just add a button to navigate to the imported policy, next to the "copy to clipboard" icon?
And single click action would select for editing.

@thjaeckle thjaeckle added this to the 3.5.0 milestone Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UI Issues related to the Ditto explorer UI
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants