Restrict exposure of full name to certain groups

Follow-up: I have started working on an implementation of this. My basic approach is:

  • Add a new site setting, “Full names visible to groups” (i.e., “groups to which any user’s full name is visible”).
  • Add a new can_see_full_names? predicate to Guardian, which checks against the site setting.
  • Replace (many) instances of SiteSetting.enable_names with the can_see_full_names? predicate.

This has been mostly straightforward — the biggest snag has been serializers not forwarding their scope parameters, and that has turned into its own little subproject.

2 Likes