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

Expose settings toggles to about:config #267

Closed
klou opened this issue Jun 25, 2021 · 6 comments
Closed

Expose settings toggles to about:config #267

klou opened this issue Jun 25, 2021 · 6 comments
Assignees
Labels

Comments

@klou
Copy link

klou commented Jun 25, 2021

Is it possible to expose and make settings configurable via about:config?

Then I could change some defaults for systemwide deployment (I'd like to enable reading Authentication-Results headers by default).

@lieser
Copy link
Owner

lieser commented Jun 27, 2021

Unfortunately it is no longer really intended that add-on get direct access (and use) about:config.

But the add-on currently has code in it to migrate the setting from older version (< 4.0.0), which did use about:config for its settings.
If the add-on will get newly installed, and has not yet settings in the new storage, you could try to misuse this migration code.

For the the ARH reading, you would need to create a Boolean setting with the name extensions.dkim_verifier.arh.read and value true.

For testing, not that uninstalling the add-on, and then restarting Thunderbird should clear the used storage (storage.local).

And do I understand you correctly that you would like to deploy the add-on in e.g. a company?

I know Firefox can now be configured via a policy file (https://support.mozilla.org/en-US/products/firefox-enterprise/policies-customization-enterprise/policies-overview-enterprise), and support for it can be added in add-ons (https://extensionworkshop.com/documentation/enterprise/adding-policy-support-to-your-extension/).

I do not know if this is also supported in Thunderbird, but would that maybe something useful for you (or others)?
Thought I do not know when I would find some time to implement support for it (if supported by Thunderbird at all).

@lieser lieser self-assigned this Jun 27, 2021
@klou
Copy link
Author

klou commented Jun 30, 2021

Thank you for the info and the workaround.

I already use both policies.json and also Thunderbird Autoconfig. Unfortunately I couldn't get it to work when setting the Preference directly (though extensions.* should be working) in policies.json.

However, it worked when I added pref("extensions.dkim_verifier.arh.read", true); to my autoconfig file.

I'll probably make this defaultPref, though I really want to figure out why it wouldn't work in the policy file.

Side note: I really appreciate your work on this addon. DKIM/SPF info should really be part of vanilla TB.

@klou
Copy link
Author

klou commented Jun 30, 2021

Sample policies.json for deploying with some company-related restrictions. I disable update checks and deploy the XPI to the local file system.

{
  "policies": {
	"DisableAppUpdate": true,
	"DisableTelemetry": true,
	"ExtensionUpdate": false,
	"ExtensionSettings": {
	  "*": {
		"__comment1__": "Default setting for all non-specified Extensions",
	    "blocked_install_message": "This extension is explicitly disallowed.",
		"install_sources": ["about:addons","https://addons.thunderbird.net/","file:///C:/Program%20Files/Mozilla%20Thunderbird/distribution/extensions/"],
		"installation_mode": "allowed",
		"updates_disabled": false
	  },
	  "dkim_verifier@pl": {
		"__comment1__": "DKIM Verifier",
		"installation_mode": "normal_installed",
		"install_url": "file:///C:/Program%20Files/Mozilla%20Thunderbird/distribution/extensions/[email protected]",
		"updates_disabled": true
      }
	},
    "Preferences": {
        "extensions.dkim_verifier.arh.read": {
		"Value": true,
		"Status": "locked"
	  }
	 
    }
  }
}

Now that I look at it, the locked setting may be causing some issues.

@klou
Copy link
Author

klou commented Jun 30, 2021

Two issues with my policies.json:

  1. My "install_sources" key is not quite right, but it doesn't cause it to fail.
  2. Thunderbird's support for the Preferences object lags behind Firefox, so TB uses the "Preferences (deprecated)" type, which is far more restrictive and doesn't support extensions.*.

So need to set the preference with autoconfig, and it works.

@lieser
Copy link
Owner

lieser commented Jul 3, 2021

Thanks for the example policies.

Note that I decided to track proper support for policies in a separated issue (#268), which you way want to subscribe too.

Do you still have any questions about the workaround, or can this be closed?

@klou
Copy link
Author

klou commented Jul 4, 2021

Thanks for all the info. I'm good with this workaround.

And RE: adding Policies to Thunderbird -- while it would be welcome, it's also a moving target in terms of supported features. I compared policies-schema.json from both Thunderbird and Firefox to see the differences.

I think that https://github.com/jobisoft merged the most recent change into Policies -- managing extension updates. But the status of Preferences (deprecated) objects shows that it's hit or miss ...

@lieser lieser closed this as completed Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants