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 disabling the onboarding panel from enterprise policies #2631

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dannycolin
Copy link
Collaborator

Before submitting your pull request

  • I agree to license my code under the MPL 2.0 license.
  • I rebased my work on top of the main branch.
  • I ran npm test and all tests passed.
  • I added test coverages if relevant.

Description

Allow disabling the onboarding panel from enterprise policies.

policies.json example:

{
  "policies": {
    "3rdparty": {
      "Extensions": {
        "@testpilot-containers": {
	  "disableOnboarding": true
	}
      }
    }
  }
}

Note: I didn't implement a policy to disable only the feature to connect to Mozilla VPN as requested because I prefer to do it in a separated patch.

Type of change

Select all that apply.

  • Bug fix
  • New feature
  • Major change (fix or feature that would cause existing functionality to work differently than in the current version)

Tag issues related to this pull request:

Additional information

cc'ing @mkaply for a review on this too.

src/js/popup.js Outdated
try {
disableOnboarding = await browser.storage.managed.get("disableOnboarding");
} catch (e) {
console.error(
Copy link

Choose a reason for hiding this comment

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

I don't think we need an error here. This is the normal case.

Does it actually throw if it isn't there?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It does. We have bug 1868153 to track it upstream.

Copy link

Choose a reason for hiding this comment

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

Let's not show the error though since nothing can be done.

src/js/popup.js Outdated
try {
disableOnboarding = await browser.storage.managed.get("disableOnboarding");
} catch (e) {
console.error(
Copy link

Choose a reason for hiding this comment

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

Let's not show the error though since nothing can be done.

@dannycolin dannycolin force-pushed the bug2565-disable-onboarding-policies branch from 0c4e802 to 299057e Compare April 22, 2024 00:24
@dannycolin dannycolin requested a review from mkaply April 22, 2024 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants