Open Bug 1280480 Opened 8 years ago Updated 2 years ago

Parental Controls interactions from Extensions

Categories

(WebExtensions :: General, enhancement, P5)

enhancement

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: freaktechnik, Unassigned)

Details

(Whiteboard: [design-decision-approved][triaged][privacy])

An API to interact with the system's parental controls features (if any) would be useful. Things I'd expect from such an API would include to be able to

 - Query the current status of Parental Controls
 - Check if an action is allowed (like browsing a certain URL or downloading something etc.)

The general enabled state is more important than being able to query for specific URLs. The main feature this would be useful for is when querying APIs for content and being able to honor the parental controls settings and limit the content displayed to the end user.
Whiteboard: [design-decision-needed]
Whiteboard: [design-decision-needed] → [design-decision-needed] triaged
Being able to prompt for parental approval would also be useful for extensions, so certain actions aren't just blocked, but need approval.
I think the parental controls are maintained by the operating system, so presumably we'd need an OS specific implementation of this.

Would the ability to call out through connectNative to the specific OS level services to query make sense? Is that possible?
Firefox already has a unified interface for it across operating systems, which can do quite a few things but I don't think every method is implemented even for just one operating system.

I am not sure how easy it would be to use with Android, as I've never looked into parental controls for Android. On the desktop operating systems that would be possible, and I don't think the requirement of installing an additional binary is too bad, it would also allow for extensions to provide their own control types (which some APIs allow).

However a basic check would still be quite handy, but I guess one could try to polyfill it by emulating a request with the Prefer: Safe header.

I am also not sure if there are parental control settings that are Firefox-specific that an extension would want to respect - I've so far only used the enabled status and thought about using prompts for certain features.
Do you know where the API (and or docs is)? The fact there's a built in API for it, sorry I didn't know about that, makes it much easier to implement.
Its interface definition is in https://dxr.mozilla.org/mozilla-central/source/toolkit/components/parentalcontrols/nsIParentalControlsService.idl which is (as for many XPCOM APIs) the best doc I know of.
Oh, and the implementing component has the Contract ID "@mozilla.org/parental-controls-service;1".
Hi Martin! This has been added to the agenda for the April 4 WebExtensions Triage meeting at 10:30am PT. Will you be able to join us? 

Call in info: https://wiki.mozilla.org/Add-ons/Contribute/Triage#Details_.26_How_to_Join

Agenda: https://docs.google.com/document/d/1V4NP4tWnjHigS2lAosCLfkU2FTcrQnoQzzXZmmB1uzk/edit#
This bug has been carried over to the April 17 WebExtensions Triage meeting. Agenda: https://docs.google.com/document/d/1zKqhDqXoH9vi88q4DGtOHm1hsCF8ZwLNvCrrCE5htbc/edit#

Martin, will you be able to join us tomorrow?
Martin, my mistake -- the meeting is on April 18, not April 17.
I'll try to, but I can't promise anything.

If I don't make it: my plan is to eventually create an experiment for this implementing two features: a property to check if parental controls are enabled and a method to trigger a privilege elevation prompt. I'm not entirely sure how doable the second part is, but the first one should be quite trivial.
I didn't follow up on this for some reason sorry. The notes from the meeting (https://docs.google.com/document/d/1zKqhDqXoH9vi88q4DGtOHm1hsCF8ZwLNvCrrCE5htbc/edit) says this was approved. But I'm struggling to remember more details than that.
Whiteboard: [design-decision-needed] triaged → [design-decision-approved] triaged
Priority: -- → P5
For reference: I started writing an experiment here: https://github.com/freaktechnik/parentalControls but haven't had resources to invest into it since. It probably doesn't work, as I've never tested it.
Product: Toolkit → WebExtensions
Bulk move of bugs per https://bugzilla.mozilla.org/show_bug.cgi?id=1483958
Component: Untriaged → General
Whiteboard: [design-decision-approved] triaged → [design-decision-approved][triaged][privacy]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.