It has been decided to not allow temporary users to thank
other users (see task). This is because the transition
between anonymous and temporary account is nearly invisible,
and it might be confusing why the thanking ability appears
and hides.
Bug: T345679
Change-Id: I62e67327c9a80b3da9e98a2dccdd4ec2051f3026
Use methods provided by core to create (non)existing test pages and
editing them. Make sure that revId is not 1, or the test will fail due
to T344475. This is needed by core change Ie2f1809d.
Change-Id: Ib7ea8c566d330db27c8abfcb4a783ddbd31787e0
I've moved all API classes into a separate folder,
as I felt like grouping modules improves readability.
APIs themselves had storage logic which I extracted and put
in another folder. I was originally going with an interface
to the storage to allow for other storage methods than
log entries, but the code was too tightly coupled with it,
so I've left that for another day. Added dependency injection
for all services and used ServiceOptions for config vars.
Bug: T337002
Change-Id: Ie8a1f435d635e1d0e1286f673bfe96cc4fdfe4fe
In detail:
* Use more compact syntax to avoid a bit of code duplication.
* Use createMock() shortcut in tests.
* Avoid hiding code in strings.
* Remove a comment that literally repeats what the code says.
Change-Id: Ibedef380489451268e2e87f0864164e8f9737913
No longer supported upstream. Was kept compatible via monkey-patch
in MW core testrunner.js. While at it, also:
* Convert one file from an ad-hoc closure to using the QUnit.module()
scop, as per <https://api.qunitjs.com/QUnit/module/>.
* Use inline variable declarations per current code conventions.
* Remove needless duplication and description from hardcoded
assertion message.
Bug: T250045
Change-Id: If556b338c6151108aeebd241b828ccb420c8b857
* Don't require a jQuery element with a specific attribute
to record thanks. Instead pass in the thanked ID directly.
* In Flow, don't override the cookieName static property,
instead pass it in as an argument.
Change the static property (effectively a global) prevents
us from having multiple types of thanks on the same page.
Change-Id: Ia569f8636f070f2af69f89d7da66c9a6f9821d24
The global function wfWikiID() is deprecated since 1.35 and it's usages
should be replaced with WikiMap::getCurrentWikiId().
Bug: T298059
Change-Id: I0cb8e96b7e988aa1d6dce0cb3cddf65fc627b214
WikiPage::factory() is deprecated since 1.36 and should be replaced
with WikiPageFactory::newFromTitle().
Bug: T297688
Change-Id: I8a141512c51b5f7901ce1af36062f9b1ae64ef7b
- Add hook to enable blocking thanks
- Check if user is blocked from 'thanks' action
and disable giving thanks from API and UI if so
Bug: T242785
Change-Id: I290a7c39c6fcb22a8ab4a9ecbad76a239cb18ea0
Reword ApiCoreThankIntegrationTest::testLogThanksForADeletedLogEntry
to avoid needing to use it
Also remove one use of doLogin(), remaining will be removed separately
Bug: T243874
Bug: T244039
Change-Id: I6cf26839cb4e3042408fb6b059fb877b605763e8
Only prohibit users from using Thanks if they are blocked from the
associated page. This allows partially blocked users to use thanks
most of the time.
It also allows blocked users to thank on their own talk page, if
they are allowed to edit it, even if they are sitewide blocked.
Bug: T221371
Change-Id: Ic99ec38ea200e806963951b2dd67e56ecde63752