collective / volto-hydra

A volto addon to let you edit content in realtime when you have many frontends written in any framework
0 stars 2 forks source link

I can Browse on the preview, then the toolbar should change based on the page #8

Closed MAX-786 closed 2 months ago

MAX-786 commented 3 months ago

Description

As an editor, I want to Browse on the preview, then the toolbar should change based on the page so that I can know the changes I can make. E.g. One one page you might have permissions to edit, on another page you might not. Or on one page there might be workflow, but another page with a different content type might not.

Technical Approach

Using URL of the current page, sidebar can know if the user got permissions to edit it or not and similar manner it can figure out if the workflows exits for this page or not. To fetch data for this URL about the permissions we can use our latest @plone/client js library. We can also figure out about user permissions by this.

djay commented 2 months ago

@MAX-786 I don't think you have to do anything with plone client. This is really just about tracking when changes are made to the url inside the iframe adn then doing a corresponding routing inside volto admin ui to go to the same page. All the existing parts of volto should do all the api calls to load content and work out permissions etc. It's more just handling that we aren't rendering the content anymore