Fix issue when modifying groups in Special:Userrights
authorRyan Schmidt <skizzerz@skizzerz.net>
Sun, 23 Jul 2017 04:19:49 +0000 (21:19 -0700)
committerLegoktm <legoktm@member.fsf.org>
Tue, 30 Jan 2018 20:51:44 +0000 (20:51 +0000)
commit069c43251e54b2b256d67438720b5e78bff46984
treed8b82349d54b381f1a5fd8ce60a94ebe3900975f
parent9cd40ec5840f39fc609593eab9d9698c3f783647
Fix issue when modifying groups in Special:Userrights

If a user has permission to remove a group but not add it, they cannot
manipulate other groups on a user who currently has the un-addable
group. An error is shown that the expiry is invalid and prevents the
save. To fix this, add a hidden input that is hardcoded to the existing
expiration (either 'existing' if it is a temporary assignment, or
'infinite' if the assignment does not expire), so that the validation
succeeds. Validation of this input is already taken care of in
execute(), so it is not possible for a user to extend an expiration this
way if they do not have the necessary privileges to do so.

Bug: T171345
Change-Id: I9268c05d6c491eab45147f8a9941ad4d4e1f563f
includes/specials/SpecialUserrights.php