[Feature request]: Add support for roles
field access configuration
#82
Labels
enhancement
New feature or request
roles
field access configuration
#82
Package name
payload-rbac
Description
I need to prevent a user from changing their own user Roles and am currently doing this via the Collection-level access configuration on the
User
collection.Field-level access configurations solve for this - inaccessible fields are grayed out in the Payload Admin view and it skips adding the field in the request body.
Without field-level access control, the user gets an error when trying to save their user record within the User edit screen (because Payload is adding the
roles
field to the request body even though it hasn't been changed in the UI), so they are never able to update their user in the Payload Admin view due to this.If you do try to add a
roles
field to the Collection, you get this error:Unable to enable payload-rbac on collection ${collection.slug}: collection already has a 'roles' field!
.We need the ability to gray out the
Roles
select control on the Admin edit screen (via supporting Field-level access configuration).Is there a way to merge the
roles
field configuration from the collection into thepayload-rbac
roles
configuration so it can leverage theaccess
field property?The text was updated successfully, but these errors were encountered: