Go to file
Kunal Mehta 498dcfeb80 Require OATHAuth for membership in specified user groups
Users in groups listed in $wgOATHRequiredForGroups (default none) must
have two-factor authentication enabled otherwise their membership in
those groups will be disabled. This is done using the
UserEffectiveGroups hook, which allows dynamically adding or removing
user groups.

If a user doesn't have 2FA enabled, it will appear to them as if they
aren't a member of the group at all. Special:Preferences will show which
groups are disabled. In the future it would be good to have a hook into
PermissionsError to show this as well. The UserGetRights hook is used to
ensure the user still has the "oathauth-enable" user right in case it
was only granted to them as part of the user group they are disabled
from.

On the outside, Special:ListUsers will still show the user as a member
of the group. The API list=users&prop=groups|groupmemberships will show
inconsistent informaiton, groups will remove disabled groups while
groupmemberships will not.

This functionality was somewhat already available with
$wgOATHExclusiveRights, except that implementation has flaws outlined at
T150562#6078263 and haven't been resolved in I69af6a58e4 for over a year
now. If this works out, it's expected that will be deprecated/removed.

Bug: T150562
Change-Id: I07ebddafc6f2233ccec216fa8ac6e996553499fb
2022-02-14 00:47:20 -08:00
.phan Upgrade to newer phan 2019-03-17 11:38:10 -07:00
i18n Require OATHAuth for membership in specified user groups 2022-02-14 00:47:20 -08:00
maintenance Replace uses of DB_MASTER with DB_PRIMARY 2021-05-13 01:25:56 +02:00
modules/totp build: Updating npm dependencies 2020-01-08 17:35:22 +00:00
sql Make SQLite compatible patches 2020-10-04 20:40:27 +00:00
src Require OATHAuth for membership in specified user groups 2022-02-14 00:47:20 -08:00
tests/phpunit/Auth Refactor includes to src #2 2019-07-04 13:36:13 +00:00
.eslintignore build: Remove duplicate eslintignore info from Gruntfile.js 2019-07-15 22:08:27 -04:00
.eslintrc.json build: Updating eslint-config-wikimedia to 0.19.0 2021-03-14 04:29:18 +00:00
.gitignore build: Upgrade eslint-config-wikimedia 0.12.0, drop grunt-jsonlint 2019-05-07 09:59:52 -07:00
.gitreview Whoops, track not trace 2016-10-24 17:03:06 -07:00
.phpcs.xml Avoid wfMessage in special page 2020-12-19 12:16:51 +01:00
.stylelintrc.json Use json extension for .stylelintrc 2017-08-19 10:12:13 +02:00
CODE_OF_CONDUCT.md build: Updating mediawiki/phan-taint-check-plugin to 1.3.0 2018-08-19 14:49:59 +00:00
composer.json Merge "composer.json: Loosen christian-riesen/base32 requirement" 2022-01-05 17:52:01 +00:00
COPYING Add COPYING 2014-01-22 21:34:11 +00:00
extension.json Require OATHAuth for membership in specified user groups 2022-02-14 00:47:20 -08:00
Gruntfile.js build: Updating dependencies 2021-01-30 06:33:24 +00:00
OATHAuth.alias.php Czech translation of new special pages 2020-11-25 23:48:08 +01:00
package-lock.json build: Updating ansi-regex to 5.0.1 2021-10-05 04:23:54 +00:00
package.json build: Updating stylelint-config-wikimedia to 0.11.1 2021-09-04 21:19:12 +00:00
ServiceWiring.php build: Updating dependencies 2021-05-12 03:37:53 +00:00