Skip to content

Commit

Permalink
Validate DBP permissions (#2673)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/1199230911884351/1207136634464353/f

**Description**:
Display error messages if DBP agent prerequisites aren't met
  • Loading branch information
Bunn authored Apr 23, 2024
1 parent 5e230ad commit cd98077
Show file tree
Hide file tree
Showing 15 changed files with 530 additions and 95 deletions.
32 changes: 32 additions & 0 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@
315AA07028CA5CC800200030 /* YoutubePlayerNavigationHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 315AA06F28CA5CC800200030 /* YoutubePlayerNavigationHandler.swift */; };
3168506D2AF3AD1D009A2828 /* WaitlistViewControllerPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3168506C2AF3AD1C009A2828 /* WaitlistViewControllerPresenter.swift */; };
3168506E2AF3AD1D009A2828 /* WaitlistViewControllerPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3168506C2AF3AD1C009A2828 /* WaitlistViewControllerPresenter.swift */; };
316913232BD2B6250051B46D /* DataBrokerProtectionPixelsHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 316913222BD2B6250051B46D /* DataBrokerProtectionPixelsHandler.swift */; };
316913242BD2B6250051B46D /* DataBrokerProtectionPixelsHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 316913222BD2B6250051B46D /* DataBrokerProtectionPixelsHandler.swift */; };
316913262BD2B76F0051B46D /* DataBrokerPrerequisitesStatusVerifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 316913252BD2B76F0051B46D /* DataBrokerPrerequisitesStatusVerifier.swift */; };
316913272BD2B76F0051B46D /* DataBrokerPrerequisitesStatusVerifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 316913252BD2B76F0051B46D /* DataBrokerPrerequisitesStatusVerifier.swift */; };
316913292BD2C7570051B46D /* DataBrokerProtectionErrorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 316913282BD2C7570051B46D /* DataBrokerProtectionErrorViewController.swift */; };
3169132A2BD2C7570051B46D /* DataBrokerProtectionErrorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 316913282BD2C7570051B46D /* DataBrokerProtectionErrorViewController.swift */; };
3171D6B82889849F0068632A /* CookieManagedNotificationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3171D6B72889849F0068632A /* CookieManagedNotificationView.swift */; };
3171D6BA288984D00068632A /* BadgeAnimationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3171D6B9288984D00068632A /* BadgeAnimationView.swift */; };
3171D6DB2889B64D0068632A /* CookieManagedNotificationContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3171D6DA2889B64D0068632A /* CookieManagedNotificationContainerView.swift */; };
Expand All @@ -186,6 +192,8 @@
31C9ADE62AF0564500CEF57D /* WaitlistFeatureSetupHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31C9ADE42AF0564500CEF57D /* WaitlistFeatureSetupHandler.swift */; };
31CF3432288B0B1B0087244B /* NavigationBarBadgeAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31CF3431288B0B1B0087244B /* NavigationBarBadgeAnimator.swift */; };
31D5375C291D944100407A95 /* PasswordManagementBitwardenItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31D5375B291D944100407A95 /* PasswordManagementBitwardenItemView.swift */; };
31DC2F222BD6DE6C001354EF /* DataBrokerPrerequisitesStatusVerifierTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31DC2F202BD6DE65001354EF /* DataBrokerPrerequisitesStatusVerifierTests.swift */; };
31DC2F232BD6E028001354EF /* DataBrokerPrerequisitesStatusVerifierTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31DC2F202BD6DE65001354EF /* DataBrokerPrerequisitesStatusVerifierTests.swift */; };
31E163BA293A56F400963C10 /* BrokenSiteReportingReferenceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31E163B9293A56F400963C10 /* BrokenSiteReportingReferenceTests.swift */; };
31E163BD293A579E00963C10 /* PrivacyReferenceTestHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31E163BC293A579E00963C10 /* PrivacyReferenceTestHelper.swift */; };
31E163C0293A581900963C10 /* privacy-reference-tests in Resources */ = {isa = PBXBuildFile; fileRef = 31E163BF293A581900963C10 /* privacy-reference-tests */; };
Expand Down Expand Up @@ -2805,6 +2813,9 @@
315AA06F28CA5CC800200030 /* YoutubePlayerNavigationHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YoutubePlayerNavigationHandler.swift; sourceTree = "<group>"; };
3168506C2AF3AD1C009A2828 /* WaitlistViewControllerPresenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WaitlistViewControllerPresenter.swift; sourceTree = "<group>"; };
316850712AF3AD58009A2828 /* DataBrokerProtectionDebugMenu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DataBrokerProtectionDebugMenu.swift; sourceTree = "<group>"; };
316913222BD2B6250051B46D /* DataBrokerProtectionPixelsHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataBrokerProtectionPixelsHandler.swift; sourceTree = "<group>"; };
316913252BD2B76F0051B46D /* DataBrokerPrerequisitesStatusVerifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataBrokerPrerequisitesStatusVerifier.swift; sourceTree = "<group>"; };
316913282BD2C7570051B46D /* DataBrokerProtectionErrorViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataBrokerProtectionErrorViewController.swift; sourceTree = "<group>"; };
3171D6B72889849F0068632A /* CookieManagedNotificationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CookieManagedNotificationView.swift; sourceTree = "<group>"; };
3171D6B9288984D00068632A /* BadgeAnimationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BadgeAnimationView.swift; sourceTree = "<group>"; };
3171D6DA2889B64D0068632A /* CookieManagedNotificationContainerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CookieManagedNotificationContainerView.swift; sourceTree = "<group>"; };
Expand All @@ -2824,6 +2835,7 @@
31C9ADE42AF0564500CEF57D /* WaitlistFeatureSetupHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistFeatureSetupHandler.swift; sourceTree = "<group>"; };
31CF3431288B0B1B0087244B /* NavigationBarBadgeAnimator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationBarBadgeAnimator.swift; sourceTree = "<group>"; };
31D5375B291D944100407A95 /* PasswordManagementBitwardenItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PasswordManagementBitwardenItemView.swift; sourceTree = "<group>"; };
31DC2F202BD6DE65001354EF /* DataBrokerPrerequisitesStatusVerifierTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataBrokerPrerequisitesStatusVerifierTests.swift; sourceTree = "<group>"; };
31E163B9293A56F400963C10 /* BrokenSiteReportingReferenceTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrokenSiteReportingReferenceTests.swift; sourceTree = "<group>"; };
31E163BC293A579E00963C10 /* PrivacyReferenceTestHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrivacyReferenceTestHelper.swift; sourceTree = "<group>"; };
31E163BF293A581900963C10 /* privacy-reference-tests */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = "privacy-reference-tests"; path = "Submodules/privacy-reference-tests"; sourceTree = SOURCE_ROOT; };
Expand Down Expand Up @@ -4439,6 +4451,14 @@
path = Subscription;
sourceTree = "<group>";
};
3169132B2BD2C7960051B46D /* ErrorView */ = {
isa = PBXGroup;
children = (
316913282BD2C7570051B46D /* DataBrokerProtectionErrorViewController.swift */,
);
path = ErrorView;
sourceTree = "<group>";
};
3171D6DC2889B6700068632A /* CookieManaged */ = {
isa = PBXGroup;
children = (
Expand All @@ -4461,6 +4481,8 @@
3192EC862A4DCF0E001E97A5 /* DBP */ = {
isa = PBXGroup;
children = (
3169132B2BD2C7960051B46D /* ErrorView */,
316913222BD2B6250051B46D /* DataBrokerProtectionPixelsHandler.swift */,
316850712AF3AD58009A2828 /* DataBrokerProtectionDebugMenu.swift */,
3192EC872A4DCF21001E97A5 /* DBPHomeViewController.swift */,
3139A1512AA4B3C000969C7D /* DataBrokerProtectionManager.swift */,
Expand All @@ -4473,6 +4495,7 @@
BBDFDC592B2B8A0900F62D90 /* DataBrokerProtectionExternalWaitlistPixels.swift */,
BB5789712B2CA70F0009DFE2 /* DataBrokerProtectionSubscriptionEventHandler.swift */,
4B37EE652B4CFC9500A89A61 /* RemoteMessaging */,
316913252BD2B76F0051B46D /* DataBrokerPrerequisitesStatusVerifier.swift */,
);
path = DBP;
sourceTree = "<group>";
Expand All @@ -4481,6 +4504,7 @@
isa = PBXGroup;
children = (
31A2FD162BAB41C500D0E741 /* DataBrokerProtectionVisibilityTests.swift */,
31DC2F202BD6DE65001354EF /* DataBrokerPrerequisitesStatusVerifierTests.swift */,
);
path = DBP;
sourceTree = "<group>";
Expand Down Expand Up @@ -9684,6 +9708,7 @@
B66260E129AC6EBD00E9E3EE /* HistoryTabExtension.swift in Sources */,
3706FB8E293F65D500E42796 /* FirefoxEncryptionKeyReader.swift in Sources */,
3706FB8F293F65D500E42796 /* BookmarkManagementSplitViewController.swift in Sources */,
316913272BD2B76F0051B46D /* DataBrokerPrerequisitesStatusVerifier.swift in Sources */,
3706FB90293F65D500E42796 /* CookieManagedNotificationContainerView.swift in Sources */,
3706FB91293F65D500E42796 /* FileManagerExtension.swift in Sources */,
3706FB92293F65D500E42796 /* PermissionModel.swift in Sources */,
Expand Down Expand Up @@ -9718,6 +9743,7 @@
3706FBA2293F65D500E42796 /* GeolocationService.swift in Sources */,
4B4D60C42A0C849600BCD287 /* NetworkProtectionInvitePresenter.swift in Sources */,
3706FBA3293F65D500E42796 /* FireproofingURLExtensions.swift in Sources */,
3169132A2BD2C7570051B46D /* DataBrokerProtectionErrorViewController.swift in Sources */,
1DDD3EC12B84F5D5004CBF2B /* PreferencesCookiePopupProtectionView.swift in Sources */,
3706FBA4293F65D500E42796 /* ContentOverlayPopover.swift in Sources */,
3706FBA5293F65D500E42796 /* TabShadowView.swift in Sources */,
Expand Down Expand Up @@ -10020,6 +10046,7 @@
7BFE955A2A9DF4550081ABE9 /* NetworkProtectionWaitlistFeatureFlagOverridesMenu.swift in Sources */,
9FDA6C222B79A59D00E099A9 /* BookmarkFavoriteView.swift in Sources */,
C1372EF52BBC5BAD003F8793 /* SecureTextField.swift in Sources */,
316913242BD2B6250051B46D /* DataBrokerProtectionPixelsHandler.swift in Sources */,
3706FC77293F65D500E42796 /* PageObserverUserScript.swift in Sources */,
4BF0E5132AD25A2600FFEC9E /* DuckDuckGoUserAgent.swift in Sources */,
3706FC78293F65D500E42796 /* SecureVaultErrorReporter.swift in Sources */,
Expand Down Expand Up @@ -10305,6 +10332,7 @@
1D9FDEBE2B9B5F0F0040B78C /* CookiePopupProtectionPreferencesTests.swift in Sources */,
028904212A7B25770028369C /* AppConfigurationURLProviderTests.swift in Sources */,
3706FE6F293F661700E42796 /* LocalStatisticsStoreTests.swift in Sources */,
31DC2F232BD6E028001354EF /* DataBrokerPrerequisitesStatusVerifierTests.swift in Sources */,
3706FE70293F661700E42796 /* HistoryCoordinatorTests.swift in Sources */,
9F3344632BBFBDA40040CBEB /* BookmarksBarVisibilityManagerTests.swift in Sources */,
3706FE71293F661700E42796 /* SavedStateMock.swift in Sources */,
Expand Down Expand Up @@ -10659,6 +10687,7 @@
AAC30A2E268F1EE300D2D9CD /* CrashReportPromptPresenter.swift in Sources */,
1D2DC00629016798008083A1 /* BWCredential.swift in Sources */,
EEA3EEB12B24EBD000E8333A /* NetworkProtectionVPNCountryLabelsModel.swift in Sources */,
316913232BD2B6250051B46D /* DataBrokerProtectionPixelsHandler.swift in Sources */,
37AFCE8727DA334800471A10 /* PreferencesRootView.swift in Sources */,
B684590825C9027900DC17B6 /* AppStateChangedPublisher.swift in Sources */,
4B92928F26670D1700AD2C21 /* BookmarkTableCellView.swift in Sources */,
Expand Down Expand Up @@ -10797,6 +10826,7 @@
4B379C2227BDBA29008A968E /* LocalAuthenticationService.swift in Sources */,
37CEFCA92A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift in Sources */,
4BB99D0326FE191E001E4761 /* SafariBookmarksReader.swift in Sources */,
316913292BD2C7570051B46D /* DataBrokerProtectionErrorViewController.swift in Sources */,
1DA6D0FD2A1FF9A100540406 /* HTTPCookie.swift in Sources */,
AACF6FD626BC366D00CF09F9 /* SafariVersionReader.swift in Sources */,
4BE65485271FCD7B008D1D63 /* LoginFaviconView.swift in Sources */,
Expand Down Expand Up @@ -11077,6 +11107,7 @@
85D885B326A5A9DE0077C374 /* NSAlert+PasswordManager.swift in Sources */,
983DFB2528B67036006B7E34 /* UserContentUpdating.swift in Sources */,
1D9A4E5A2B43213B00F449E2 /* TabSnapshotExtension.swift in Sources */,
316913262BD2B76F0051B46D /* DataBrokerPrerequisitesStatusVerifier.swift in Sources */,
4B7A57CF279A4EF300B1C70E /* ChromiumPreferences.swift in Sources */,
AA6AD95B2704B6DB00159F8A /* FirePopoverViewController.swift in Sources */,
4BE4005327CF3DC3007D3161 /* SavePaymentMethodPopover.swift in Sources */,
Expand Down Expand Up @@ -11537,6 +11568,7 @@
142879DC24CE1185005419BB /* SuggestionContainerViewModelTests.swift in Sources */,
566B195D29CDB692007E38F4 /* MoreOptionsMenuTests.swift in Sources */,
AA0877B826D5160D00B05660 /* SafariVersionReaderTests.swift in Sources */,
31DC2F222BD6DE6C001354EF /* DataBrokerPrerequisitesStatusVerifierTests.swift in Sources */,
B69B50452726C5C200758A2B /* AtbParserTests.swift in Sources */,
1D8C2FED2B70F5D0005E4BBD /* MockViewSnapshotRenderer.swift in Sources */,
B6106BAF26A7C6180013B453 /* PermissionStoreMock.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "dbp-error-info.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "original"
}
}
Binary file not shown.
10 changes: 10 additions & 0 deletions DuckDuckGo/Common/Localizables/UserText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1138,4 +1138,14 @@ struct UserText {
// Key: "subscription.progress.view.completing.purchase"
// Comment: "Progress view title when completing the purchase"
static let completingPurchaseTitle = "Completing purchase..."

// MARK: - DBP Error pages

static let dbpErrorPageBadPathTitle = "Move DuckDuckGo App to Applications"
static let dbpErrorPageBadPathMessage = "To use Personal Information Removal, the DuckDuckGo app needs to be in the Applications folder on your Mac. You can move the app yourself and restart the browser, or we can do it for you."
static let dbpErrorPageBadPathCTA = "Move App for Me..."

static let dbpErrorPageNoPermissionTitle = "Change System Setting"
static let dbpErrorPageNoPermissionMessage = "Open System Settings and allow DuckDuckGo Personal Information Removal to run in the background."
static let dbpErrorPageNoPermissionCTA = "Open System Settings..."
}
Loading

0 comments on commit cd98077

Please sign in to comment.