irods-contrib / metalnx-web

Metalnx Web Application
https://metalnx.github.io/
BSD 3-Clause "New" or "Revised" License
36 stars 36 forks source link

[295] Render save buttons of preview tab based on permission type #298

Closed connectbo closed 2 years ago

connectbo commented 2 years ago

This pr modifies the preview controller and fixes the conditional rendering issues (missing save and cancel buttons) on the preview tab. After clicking onto the preview tab, metalnx will load the permission type from the collection service and render buttons based on that.

If the user only has 'read' permission: image

If the user has 'write' permission or owns this file: image

If the user doesn't have access to this file, the preview tab won't render.

@trel I think it's ready for your review, let me know if an issue arises.

trel commented 2 years ago

I confirm it works for me... I change the permissions and the button goes away as expected.

Please # it!

connectbo commented 2 years ago

cool, added #.