Page MenuHomePhabricator

Support private user group conditions
Closed, ResolvedPublic

Description

Background

Currently, if a performer-target pair doesn't meet conditions for a given group, the relevant checkbox on Special:UserRights is going to be disabled.

This works fine if conditions are based on publicly-accessible data, such as account age, number of edits etc. However, some conditions, such as whether the user has 2FA configured are deemed 'private' and therefore their status should not be proactively advertised.

Acceptance criteria

  • Implement a mechanism that defines certain $wgRestrictedGroups conditions as private.
  • Checkboxes on Special:UserRights for groups using private conditions should be enabled, regardless of whether the conditions are met or not.
  • Trying to assign a user, which doesn't meet conditions, to a group using private condition should fail with an error message explaining what happened.
  • Extensions should be able to react to the above-mentioned failures. (extracted to T415491)

Event Timeline

mszwarc changed the task status from Open to In Progress.Jan 20 2026, 9:08 AM
mszwarc claimed this task.

Change #1229111 had a related patch set uploaded (by Mszwarc; author: Mszwarc):

[mediawiki/core@master] Support defining private user requirements conditions

https://gerrit.wikimedia.org/r/1229111

Change #1229533 had a related patch set uploaded (by Mszwarc; author: Mszwarc):

[mediawiki/core@master] Don't expose private group requirements upfront

https://gerrit.wikimedia.org/r/1229533

Change #1229111 merged by jenkins-bot:

[mediawiki/core@master] Support defining private user requirements conditions

https://gerrit.wikimedia.org/r/1229111

Change #1230244 had a related patch set uploaded (by Mszwarc; author: Mszwarc):

[mediawiki/core@master] Don't expose private group requirements upfront on Special:UserRights

https://gerrit.wikimedia.org/r/1230244

Change #1229533 merged by jenkins-bot:

[mediawiki/core@master] Support private conditions in UserGroupAssignmentService

https://gerrit.wikimedia.org/r/1229533

Change #1230244 merged by jenkins-bot:

[mediawiki/core@master] Don't expose private group requirements upfront on Special:UserRights

https://gerrit.wikimedia.org/r/1230244

Change #1230916 had a related patch set uploaded (by Mszwarc; author: Mszwarc):

[mediawiki/core@master] Special:UserRights: Display error when adding disallowed groups

https://gerrit.wikimedia.org/r/1230916

Change #1230916 merged by jenkins-bot:

[mediawiki/core@master] Special:UserRights: Display error when adding disallowed groups

https://gerrit.wikimedia.org/r/1230916