Read-only custom user fields

(Ed Ceaser) #1

This might be obvious and I’m just missing something but:

Is there a way to add a custom user field in a plugin that is read-only from the perspective of UsersController#update?

If I use custom_user_fields, and add the field to the user via a serializer, it attempts to get written back to the DB on user update.

I can probably work around it by not using the user serializer helpers and by extending it explicitly, but I’d like to know if there is an “official” way to do this.