ActivityWatch / aw-watcher-web

Browser watcher for ActivityWatch
Mozilla Public License 2.0
312 stars 42 forks source link

Feature: Privacy Notice Consent popup for Firefox #99

Closed Morpheus0x closed 1 year ago

Morpheus0x commented 1 year ago

This pull request addresses the issue raised here. This should satisfy the Mozilla addon review team. I have written a small Privacy Notice in static/consent.html, no idea if this is enough and if it can be used as a privacy policy for the whole addon...

I have added a saveguard to the normal addon popup page. If the user dismisses the privacy notice, the enable checkbox is disabled and a button is shown that shows the consent popup again.

I tested this with latest Firefox and Chromium.

Morpheus0x commented 1 year ago

Something I forgot to mention, the consent popup explicitly only shows up for Firefox and not for any other fork or Chromium based Browser. The extension will just work as it has previously, except for Firefox.

ErikBjare commented 1 year ago

Very nice! Thank you for this @Morpheus0x :heart:

Can we prompt the user to uninstall the extension if they do not consent?

Morpheus0x commented 1 year ago

Very nice! Thank you for this @Morpheus0x heart

Can we prompt the user to uninstall the extension if they do not consent?

Happy to help 😃

I don't think that's possible. After quite a bit of googling, I didn't find anything, even though it is referenced twice on the page you linked (also at the very bottom image). The only thing related I found was this stackoverflow question, but the AddonManager API seems deprecated, since no documentation exists. I didn't even try to use this.

That is why I implemented an additional safeguard if the user closes the popup and then tries to enable the watcher.

Edit: I will ask on the Mozilla Discourse what should be done according to these docs Edit 2: here

Morpheus0x commented 1 year ago

Got a very quick response from discourse and implemented remove extension. My safeguard is still valid, since the popup could just be closed, which doesn't remove the extension.

Morpheus0x commented 1 year ago

This should be my last commit for this feature. I forgot to add support to skip the consent window by setting the enterprise policy, see Adding policy support to your extension for info. I have added the needed enterprise policy to the readme.

Edit: I tested this again with latest Firefox and Chromium

Morpheus0x commented 1 year ago

Any timeline for merging this PR? I would like to start working on #82 and don't want to get into any merge conflicts

ErikBjare commented 1 year ago

I'm on vacation, but can merge it straight away in the meantime so you can keep working :)

ErikBjare commented 1 year ago

Thanks again for working on this @Morpheus0x ❤️

Morpheus0x commented 1 year ago

I'm on vacation, but can merge it straight away in the meantime so you can keep working :)

Awesome, thanks, have a relaxing time.

Thanks again for working on this @Morpheus0x heart

Sure, no problem :wink:

GeorchW commented 1 year ago

Is the extension going to re-appear in the extension store soon then? Can I do anything to help with this?