weblate icon indicating copy to clipboard operation
weblate copied to clipboard

API unit creation is not available if "Manage strings" is disabled

Open antonkomarev opened this issue 3 years ago • 5 comments

Describe the problem

I want to disable adding new units creation from UI, but keep this functionality for the API call:

POST /api/translations/{project}/{component}/en/units/

There is Manage strings feature, but it disables API creation too 😢

Describe the solution you'd like

I want to be able to create units from API from this endpoint even if "Manage strings" option is disabled, or have separate one (if this endpoint is used in the UI).

Describe alternatives you've considered

No response

Screenshots

No response

Additional context

No response

antonkomarev avatar Sep 14 '22 15:09 antonkomarev

The API is intentionally consistent with the UI

nijel avatar Sep 14 '22 17:09 nijel

@nijel I want to make some kind of middleware service which will be responsible for managing source strings. Users from the UI cannot add or modify them. Is there is any way to do it without making raw SQL queries?

antonkomarev avatar Sep 14 '22 17:09 antonkomarev

There is separate permission for this (Add new string), using that might be better way to go if you want to restrict usage in some cases.

nijel avatar Sep 15 '22 11:09 nijel

This issue looks more like a support question than an issue. We strive to answer these reasonably fast, but purchasing the support subscription is not only more responsible and faster for your business but also makes Weblate stronger.

In case your question is already answered, making a donation is the right way to say thank you!

github-actions[bot] avatar Sep 15 '22 11:09 github-actions[bot]

So I need only one user account which can do that functionality, let's say bot user. And other teams can't add keys, right?

antonkomarev avatar Sep 15 '22 15:09 antonkomarev

Yes.

nijel avatar Sep 22 '22 08:09 nijel

This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!

github-actions[bot] avatar Oct 03 '22 02:10 github-actions[bot]