Hide user custom fields from users below certain trust level

Is there a way to configure discourse to show some user custom fields only to users with a certain trust level?

This is my use case:

We use our discourse instance for communicating with our customers. We store some informations (e.g. the customer’s ID) in custom user fields via API. Some of them we want to be displayed on the public user profile for everyone, others should only be visible only to people of our company.

I tried this preferences for “staff” (even if it’s not trust level specific), but they seem to do nothing?

(I read here that “public user custom fields” is meant for another purpose. I’m okay with that, because they are already configured at the custom field settings.)

Is there a way to hide some custom fields from users below a specific trust level? Or is there any way to alter the default behavior with a plug-in?

Thanks!

This would have to be in the plugin departement for now, a bit scared of adding 4 more site settings there it gets a bit hard to explain.

1 Like

I would also find this useful. Or rather, a more generic version of it: custom user field visibility based on group membership. Is this still plugin domain?

Perhaps a simpler version would be to flip things around: instead of specifying which TL can see which fields in site settings, add a setting to the create new user field form asking which groups can see this field. Something like this:

1 Like