Page MenuHomePhabricator

Disable editing hidden profile sections
Open, Needs TriagePublic

Description

We're able to hide some profile info sections (like personal, interests etc.) by the $wgUserProfileDisplay variable, but we cannot hide it from profile editing page.

I want to do both: hide it from users' profiles and disable editing it by users (hide from profile editing page). I have two ideas:

  1. use $wgUserProfileDisplay to determine if user should or not be able to edit a section - preferred by me, but breaks the rule that displaying in profile is not the same as possibility to use a feature;
  2. introduce a new setting, e.g. $wgUserProfileInfoEnabled used for enabling or not sections with information about a user.

Please let me know what do you think

Event Timeline

Hi, @ashley & rest of the maintainers,
I wanted to ask about your opinion. I'll be happy to contribute for solving the issue, if the SocialTools team accepts the idea, and we choose the best option :)

Hmm, so essentially $wgHiddenPrefs but for SocialProfile? Neat idea!

In T269798, @Kam193 wrote:

use $wgUserProfileDisplay to determine if user should or not be able to edit a section - preferred by me, but breaks the rule that displaying in profile is not the same as possibility to use a feature;

While I'm certainly not opposed to introducing a new config global, this seems like the logical solution; if something is not shown on profile pages, would there really be much of a reason to be able to...edit something no-one else will ever see?

That said, one issue with this approach that I can think of is that perhaps we want more fine-grained control than what is currently possible, e.g. instead of hiding "Personal information" section only hide "Hometown" and "Current location", etc.

if something is not shown on profile pages, would there really be much of a reason to be able to...edit something no-one else will ever see?

Exactly. How surprised I was, when I realized that user can edit hidden parts of the profile :)

Fine-grained control seems perfect, but it's more work and not backward compatible, I think. Maybe I can create the basic version, using current config, and we can separate changing the control as a new ticket?

$wgUserProfileDisplay controls more than just user information (e.g. last activity etc.), so probably we shouldn't just replace section-keys with single-data-keys direct here, what do you think? Or eventually, we can use both: section and single data (hometown etc). To display/edit information, both section and information keys need to be enabled + we're backward compatible.