Commit graph

5 commits

Author SHA1 Message Date
Umherirrender
3f1c5d0eea Document list of change tags as string[]
Change-Id: I0ce2a8154af82a363fef126033b5819c4ee84842
2020-11-20 14:12:54 +01:00
Martin Urbanec
b5ef266181 Do not call SpecialBlock from BlockUser
Bug: T263189
Change-Id: If7c0a5929826265045ebba3c19663ec19d3dfc0b
2020-10-04 23:20:06 +02:00
Martin Urbanec
a656d03597 Introduce backend class for blocking users
Rather than having to do DatabaseBlock calls directly,
and then ManualLogEntry calls to facilitate logging,
let's create a BlockUser service, capable of blocking users
and logging, optionally with permission checking.

This should make blocking users easier for developers,
for instance, AbuseFilter or CheckUser can easily
benefit from this commit.

Bug: T189073
Change-Id: Ifdced735b694b85116cb0e43dadbfa8e4cdb8cab
2020-09-22 14:14:01 +01:00
Thalia
addb098c39 Deprecate DatabaseBlock methods moved to DatabaseBlockStore
Following 23c3c70d7f, soft deprecate the static methods on
DatabaseBlock that have been moved to DatabaseBlockStore:
* ::insert
* ::delete
* ::update
* ::purgeExpired

Update calls to the deprecated methods from core.

Change-Id: I1272eb978594fd4f386bda12cbc24131ad7d882f
2020-09-13 22:17:27 +00:00
Martin Urbanec
d64efdeacb Introduce backend class for unblocking users
Create UnblockUserFactory service, which returns an UnblockUser.
UnblockUser::unblock replaces SpecialUnblock::processUnblock, which
is now deprecated.

Update SpecialUnblock and ApiUnblock to use UnblockUser, removing
the API module's dependency on the special page.

Update SpecialUnblock::processUIUnblock to use UnblockUser, and mark
it for internal use only. It now returns a Status object.

Also add BlockPermissionChecker::checkBasePermissions, which checks
for the 'block' right and the 'hideuser' right if necessary.

Bug: T250020
Change-Id: Ide31da469297f4582ad0e3f7f1a7c40d542923f8
2020-08-25 13:34:36 +01:00