I have a roles field and I need to hide it during account creation:
I have tried this however when I create an account I have the option to choose from available. How do I hide it?
@xavierpacheco Morning! This would be a field-level access control configuration
https://payloadcms.com/docs/access-control/fields
Specifically the "Read" operation
Hello, I already have it config as a field Level Access
The problem is, upon account creation it shows up and I don't want it to show up during account creation
In this case, this is an admin only check
So a normal user creating account should't see the role selector
is it set to required?
I'm surprised it would show if you've set field level access control
Hey, no its not required
have you checked your !isAdmin condition? also maybe trying a condition like:
{
admin: {
// check docs for example
condition:(
,,{user}) => {
// user exists and not admin
}
}
}
the access control will protect the backend, and this should hide in dashboard
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.