A plugin to register array fields with a custom input component to store field values in multiple languages, queryable by using the language ID as an array `_key`.
When a user has read-only permissions - ("Viewer") role or if the field is read-only, the user can still click on options to create an internationalized string/text for a new locale. But because of the restrictions, it would throw an error.
To Reproduce
Steps to reproduce the behaviour:
Create a user and assign Viewer role to it.
Create aninternationalizedArrayString type field.
When you click on any of the configured languages, it would throw an error
Expected behaviour
Either user should not be able to click it or user should not be able to see the buttons at all to create more localised strings
Screenshots
Which versions of Sanity are you using?
@sanity/cli (global) 3.50.0 (latest: 3.52.0)
@sanity/color 3.0.6 (up to date)
@sanity/color-input 3.1.1 (up to date)
@sanity/document-internationalization 3.0.0 (up to date)
@sanity/form-builder 2.36.2 (up to date)
@sanity/icons 3.3.0 (latest: 3.3.1)
@sanity/image-url 1.0.2 (up to date)
@sanity/language-filter 4.0.2 (up to date)
@sanity/ui 2.6.8 (latest: 2.8.8)
@sanity/util 3.50.0 (latest: 3.52.0)
@sanity/vision 3.50.0 (latest: 3.52.0)
@sanity/webhook 4.0.4 (up to date)
sanity 3.50.0 (latest: 3.52.0)
Describe the bug
When a user has read-only permissions -
("Viewer") role
or if the field is read-only, the user can still click on options to create an internationalized string/text for a new locale. But because of the restrictions, it would throw an error.To Reproduce
Steps to reproduce the behaviour:
Viewer
role to it.internationalizedArrayString
type field.Expected behaviour
Either user should not be able to click it or user should not be able to see the buttons at all to create more localised strings
Screenshots
Which versions of Sanity are you using?
What operating system are you using?
Which versions of Node.js / npm are you running?