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

Capabilities.UpdateRestrictions #102

Open
writefayaz opened this issue Sep 4, 2024 · 1 comment
Open

Capabilities.UpdateRestrictions #102

writefayaz opened this issue Sep 4, 2024 · 1 comment
Labels
author action enhancement New feature or request

Comments

@writefayaz
Copy link

First, I want to express my appreciation for the excellent work on the cap-js/attachments plugin—it has been incredibly useful in our projects. However, I've encountered a challenge when using it. Specifically, when I annotate a service with Capabilities.DeleteRestrictions and Capabilities.UpdateRestrictions, these restrictions don't seem to apply to the plugin's upload functionality. This means that users are still able to upload new attachments or delete existing ones, even when such actions should be restricted.

It would be wonderful if the cap-js/attachments plugin could respect the Capabilities.DeleteRestrictions and Capabilities.UpdateRestrictions annotations. When these restrictions are present, I would like the plugin to prevent users from uploading new attachments or deleting existing ones, ensuring consistency with the specified permissions.

I've considered the option of manually overriding the plugin's functionality in the frontend to enforce these restrictions. However, having this feature built into the plugin would simplify the process and reduce the need for custom code, which I believe would be beneficial to many users.

Fayaz Mammoo

@writefayaz writefayaz added the enhancement New feature or request label Sep 4, 2024
@RamIndia
Copy link
Contributor

RamIndia commented Oct 9, 2024

@writefayaz : Can you check if @readonly annotations works for you?
https://cap.cloud.sap/docs/advanced/fiori#prefer-readonly-mandatory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author action enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants