Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace mentions of 'whitelist' with 'allowlist' #1209

Merged
merged 5 commits into from Oct 5, 2020

Conversation

jlt10
Copy link
Contributor

@jlt10 jlt10 commented Oct 1, 2020

Replace mentions of 'whitelist' with 'allowlist'

This repo uses the term whitelist instead of allowlist. This PR replaces every instance of "whitelist" in the code with "allowlist".

I am targeting this branch, because this is a backward compatible bug fix.

Closes #1174.

Changelog

### Changed
- Replace mentions of 'whitelist' with 'allowlist'

@jlt10 jlt10 marked this pull request as ready for review October 1, 2020 20:45
Co-authored-by: Fran Moreno <franmomu@gmail.com>
@@ -784,15 +784,15 @@
revert: true,
connectToSortable: '.page-composer__container__children',
accept: function (source) {
var blockWhitelist = $(this).attr('data-block-whitelist');
if (blockWhitelist === '') {
var blockAllowlist = $(this).attr('data-block-allowlist');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically speaking, this is a BC break.

I think we could risk this, unless you leave an upgrade note.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm new to this, what is the best way to leave an upgrade note?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a UPGRADE.md file, you could add an entry to this file to explain the change.

Another solution would be to select
´´´
This.data(whitelist) || this.data(allowlist)
´´´
With a next major to remove the whitelist part

(Im on phone, the code is wrong but the idea is here)

@@ -54,6 +54,8 @@ file that was distributed with this source code.
{% if container.block is defined and container.block %}
<a class="page-composer__page-preview__container block-preview-{{ container.block.id }}"
data-block-id="{{ container.block.id }}"
data-block-allowlist="{{ container.area.blocks|join(',') }}"
{# NEXT_MAJOR: Remove the following line #}
data-block-whitelist="{{ container.area.blocks|join(',') }}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not solve the problem when someone is overriding this template.

@jlt10 jlt10 requested a review from core23 October 5, 2020 15:02
@VincentLanglet VincentLanglet requested a review from a team October 5, 2020 15:12
@VincentLanglet VincentLanglet merged commit e8e3e85 into sonata-project:3.x Oct 5, 2020
@VincentLanglet
Copy link
Member

Thanks @jlt10

@jlt10
Copy link
Contributor Author

jlt10 commented Oct 5, 2020

Happy to help! @VincentLanglet do you mind adding the label "hacktoberfest-accepted" to this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove oppressive words from code
5 participants