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

Allow excluding regions #6278

Merged
merged 6 commits into from
Nov 17, 2021
Merged

Conversation

ApCoder123
Copy link
Member

@ApCoder123 ApCoder123 commented Nov 13, 2021

Currently, if a site is available everywhere in the world apart from one region, it is necessary to list all region codes in the regions array apart from that region to exclude it from that single region's site. This PR modifies the regions array to allow excluding regions to prevent sites that aren't available in certain regions from being displayed on their regional sites.

Examples of entries would be:

@ApCoder123 ApCoder123 added the enhancement Issue/PR contains enhancements to the overall code of the site. label Nov 13, 2021
@Carlgo11
Copy link
Member

I like the idea! What if instead of a new array we used - as a suffix to the region?
Like:

"regions" : [
  "-us"
]

That would make it look neater if/when we add region groups like europe and north america.

Fix region code validation

Fix map statement

Fix rubocop errors
@phallobst phallobst merged commit f8ac649 into 2factorauth:master Nov 17, 2021
@ApCoder123 ApCoder123 deleted the exclude-regions branch November 17, 2021 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue/PR contains enhancements to the overall code of the site.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants