I have set up isAdmin and isAdminField permissions which works fine. However, I would like to set up categories so that it is only possible to select pre-existing categories, disallowing to create new categories if not admin. So if the role is editor (e.g. not admin), then only selecting existing categories in the category relationship field should be possible.
I have already tried with:
access: {
create: access.isAdminFieldLevel,
update: access.isAdminFieldLevel,
},
but the problem is that with this restriction the entire field becomes un-editable, so selecting existing categories wont work. Any suggestions on how to solve this?
Found the solution: I have to move the access control directly to the category collection and set the access so that admin is the only one that can write changes.
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.