Closed Bug 1642690 Opened 5 years ago Closed 4 years ago

Add identities API and allow setting/getting the signature via identities

Categories

(Thunderbird :: Add-Ons: Extensions API, enhancement)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED
91 Branch

People

(Reporter: brice.paccoud, Assigned: TbSync)

References

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

In API add preferences managment.
Get a preference
Set a preference

The general intention with WebExtensions is to be more restrictive about what extensions are able to do without permissions from the user.

Being able to fully modify any preference is dangerous, as a WebExtension could for example disable security measures, disable updates or other things.

Another example is that giving access to preferences would automatically grant you account/identity information, which there is an already separate permission for.

I think it would probably be better to approach this request from which preferences you need access to (and maybe why), and then figure out what APIs would be useful around that.

(In reply to Mark Banner (:standard8) from comment #1)

Hello Mark,

I'm agree with you about security.
My need is to access to signature preference in order to automatically update it from a backend rest api.
I'm going to work on a backend for managing model signature, signature by account, generating signature from model ...
The goal is to deploy automatically signatures without user action.
So today i use expirment API in order to access preference but there is an API existing i want to use it.

Thanks

Thanks, I'm going to make this bug more specific to allow setting/getting the signature on identities - my Conversations add-on could likely use this as well.

We do have the start of identity information for accounts coming in the 78 version, so it could likely be added to that (but not in time for 78):

https://thunderbird-webextensions.readthedocs.io/en/latest/accounts.html

Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Set and Get preferences API (from prefs.js) → Allow setting/getting the signature via identities

Hello Mark,

Good news.

It's about :
mail.identity.idXXXX.htmlSigText
mail.identity.idXXXX.htmlSigformat
mail.identity.idXXXX.attach_signature
mail.identity.idXXXX.sig_file (and update mail.identity.idXXXX.sig_file-rel)
mail.identity.idXXXX.sign_mail

Waiting the new API, i use expirment API.

Thanks Mark

Assignee: nobody → john
Status: NEW → ASSIGNED

The patch allows getting and updating identities, including the signature. From the list in Comment 4 I included:

  • mail.identity.idXXXX.htmlSigText
  • mail.identity.idXXXX.htmlSigformat

What are the others about?

Hi,
I'm pleased for this change. Settings you add are perfect for me, it's what I'm using in my extension (https://github.com/kam193/thbrd-signature/blob/master/signature-extension/implementation.js)

I'd be happy to do a migration to the new API & verify if it replaces my experimental APIs.

See Also: → 1649715
Attachment #9222673 - Attachment is obsolete: true
Attachment #9226564 - Attachment description: Bug 1642690 - Add identities API including signature support, update/delete/create functions and events. r=darktrojan → WIP: Bug 1642690 - Add identities API including signature support, update/delete/create functions and events. r=darktrojan
Attachment #9226564 - Attachment description: WIP: Bug 1642690 - Add identities API including signature support, update/delete/create functions and events. r=darktrojan → Bug 1642690 - Add identities API including signature support, update/delete/create functions and events. r=darktrojan
Summary: Allow setting/getting the signature via identities → Add identities API and allow setting/getting the signature via identities

Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/bf81ba928b15
Add identities API including signature support, update/delete/create functions and events. r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: