Page MenuHomePhabricator

Stop showing block warning message if user is whitelisted
Closed, ResolvedPublic


One of the criteria to qualify for the Library Bundle is that the user should have no blocks on their account. Sometimes, however, a user has a block which doesn't reflect their standing in the community, and they should therefore continue to be able to access the library. Examples include username blocks on projects they've never edited.

When a user is blocked in this way they receive a message on the homepage asking them to contact us to get whitelisted against this criteria. We can then whitelist the user, and they become eligible for the library. However, the message doesn't go away, which is confusing:

Bildschirmfoto 2021-03-24 um 21.14.48.png (1×974 px, 144 KB)

We should hide this red block message if the user has been whitelisted. To do this, we need to update this if statement:

It should also check if user.editor.ignore_wp_blocks is False (and not user.editor.ignore_wp_blocks). If we have ignored this user's Wikimedia blocks, then the message will no longer appear.

Good first task

This task has been placed in the good first task category. This means it has been scoped and written in a way that makes it simpler for folks who haven’t contributed to the tool’s development or open source software in the past.

If that’s you, welcome! Please feel free to ask questions here about this specific task or the codebase more generally. We’ll be more than happy to help you and clarify the steps needed to complete the task, whether that’s setting up the repository, implementing the necessary changes, or pushing your changes to Github.

If you have experience contributing to this project or similar ones, please consider leaving this one for someone new, and taking a look at the Open Tasks column of the workboard for another task. Also feel free to help out if you see unanswered questions here!

How to contribute

Assign yourself to this task: Click the ‘Add Action’ dropdown menu below and then select Assign / Claim. The box should fill your username in automatically, then click Submit!

The Library Card platform repository can be found at WikipediaLibrary/TWLight. Please see the Getting Started and Local Setup guides to get up and running with a local development environment.

To submit your changes, you should fork the repository and create a new branch. After pushing your changes to your Github branch, you can open a pull request. Please link your pull request in a comment here when it has been submitted, and include the Phabricator task number in the pull request. Experienced contributors to the project will review your code and either provide feedback or merge it in!

Event Timeline

Hi @Sahilgrewalhere it looks like your PR also includes some previous changes by you for another PR. You'll need to remove those commits from the PR before we can work with it :)

Hey @Samwalton9 ! I have removed the previous commits ...checkout!

Samwalton9 moved this task from Ready to Review on the The-Wikipedia-Library (Kanban) board.
Scardenasmolinar added a subscriber: Scardenasmolinar.

I have reviewed this PR. @Samwalton9, shouldn't we check that user.editor.ignore_wp_blocks to be True instead of False?