-
Notifications
You must be signed in to change notification settings - Fork 11
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
Only show DBP for US users #1792
Conversation
} | ||
|
||
// Only show Private Information Removal (DBP) for US based users | ||
if (regionCode ?? "US") == "US" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a chance (using both methods to acquire the locale) that a user's region code could be nil
. In this case I've elected to show the feature as we've discussed the risk of non-US users accessing the feature is minimal. I'm open to other suggestions though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. For the dev situation we could do something like this:
#if DBP
var shouldShowDBPMenuItem = false
#if DEBUG
shouldShowDBPMenuItem = true
#else
var regionCode: String?
if #available(macOS 13, *) {
regionCode = Locale.current.region?.identifier
} else {
regionCode = Locale.current.regionCode
}
shouldShowDBPMenuItem = regionCode ?? "US" == "US"
#endif
....
Task/Issue URL: https://app.asana.com/0/72649045549333/1205660000891177/f Tech Design URL: https://app.asana.com/0/1204586965688315/1205744067595006/f CC: **Description**: This PR gates DBP for US users only **Steps to test this PR**: 1. Make sure your locale is set to the US. "Private Information Removal" should show in the more menu 2. Set your locale to another country (or flip the `==` to `!=`). "Private Information Removal" should *not* show in the more menu <!-- Tagging instructions If this PR isn't ready to be merged for whatever reason it should be marked with the `DO NOT MERGE` label (particularly if it's a draft) If it's pending Product Review/PFR, please add the `Pending Product Review` label. If at any point it isn't actively being worked on/ready for review/otherwise moving forward (besides the above PR/PFR exception) strongly consider closing it (or not opening it in the first place). If you decide not to close it, make sure it's labelled to make it clear the PRs state and comment with more information. --> --- ###### Internal references: [Pull Request Review Checklist](https://app.asana.com/0/1202500774821704/1203764234894239/f) [Software Engineering Expectations](https://app.asana.com/0/59792373528535/199064865822552) [Technical Design Template](https://app.asana.com/0/59792373528535/184709971311943) [Pull Request Documentation](https://app.asana.com/0/1202500774821704/1204012835277482/f)
Task/Issue URL: https://app.asana.com/0/72649045549333/1205660000891177/f
Tech Design URL: https://app.asana.com/0/1204586965688315/1205744067595006/f
CC:
Description:
This PR gates DBP for US users only
Steps to test this PR:
==
to!=
). "Private Information Removal" should not show in the more menuInternal references:
Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation