Is it possible to only allow changes if locale is equal X?
I have some fields that is not localized, I want them to only be editable when on a specific locale.
It's some checkboxes regarding SEO - see image 🙂
You could write a
beforeValidate
hook that does your own access control of sorts by looking at the
req.locale
and the
req.user
to throw a 403. The issue with doing this is that you have no feedback for the user that they won't be able to do this. The normal
access
control built into Payload informs the UI on what the user can do to prevent this UX problem.
We do have a feature planned for locale based
access
control so the answer might just be to hang tight :/
Star
Discord
online
Get dedicated engineering support directly from the Payload team.