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 Webextensions to get,set and remove assignments #1197

Closed

Conversation

ramkumar-kr
Copy link

@ramkumar-kr ramkumar-kr commented Apr 21, 2018

Hi,

I'm the author of the containers-sync extension and I have been getting requests to sync assignments along with containers.

Taking inspiration from #1095 , I added a few more enhancements which would enable extensions with "contextualIdentities" permission to get all assignments for a container, set and remove assignments.

- Add getAssignmentObjectByContainer method to get all assignments for a given container
- Add setAssignment to assign a URL to a given container
- Add removeAssignment to remove an assignment
@frankhommers
Copy link

I would love this functionality!

@maxnordlund
Copy link

This would also help clean up storage.js that is filled with temporary containers (5302 empty ones last I checked).

Of course that's kinda my own fault, but still, having an API like this would allow extensions like temporary containers to clean up after themselves.

@groovecoder
Copy link
Member

Haven't had a chance to look into this specific PR, but this comment on another issue to synchronize containers made me realize that integrating code from your containers-sync extension may be relatively straight-forward project for this extension.

I'm going to spend a few cycles seeing if I can draw up a project statement-of-work for that to get some help on it.

@stoically
Copy link
Member

@groovecoder I'd be interested in helping out implementing export/import/sync for MAC. Did you already have a chance working on that statement-of-work? containers-sync seems to operate solely on container names - which might be prone to unexpected behavior if containers are renamed. Maybe a solution to that would be to generate UUIDv4's for the containers, so they can get uniquely identified.

In general I would support merging and publishing this PR, so @ramkumar-kr and others can experiment and see how things work out. Although I'm a bit biased, because being able to set assignments through the API would allow me to implement an often requested feature in Temporary Containers.

Copy link
Member

@stoically stoically left a comment

Choose a reason for hiding this comment

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

Looks good to me

@groovecoder
Copy link
Member

This was a great contribution, and led directly to @kendallcorner building sync into Multi-Account Containers.

But, an API for site assignment data opens a hole that could leak someone's browsing history/sites to other add-ons in unexpected and hard-to-inform ways.

Closing this unless or until we come up with a way to enforce user consent before allowing this access.

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.

5 participants