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:
If the user has 'write' permission or owns this file:
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.
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](https://user-images.githubusercontent.com/33065086/146259664-9237a776-cdd5-46e2-abfa-139a61749844.png)
If the user has 'write' permission or owns this file:![image](https://user-images.githubusercontent.com/33065086/146259745-26c4dbe6-700b-453a-baeb-9ae3ba022f8d.png)
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.