-
Notifications
You must be signed in to change notification settings - Fork 324
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
Add window.ipfs.enable(opts) (Bulk Permission Prompt) #619
Commits on Dec 10, 2018
-
feat: scaffolding for window.ipfs.enable
This simply changes the flow and API for getting IPFS proxy instance, does not implement UX nor decrease the size of injected content script.
Configuration menu - View commit details
-
Copy full SHA for 4e6f65d - Browse repository at this point
Copy the full SHA 4e6f65dView commit details
Commits on Dec 12, 2018
-
This change adds async `enable` function that takes optional list of commands to grant access to via user prompt. The goal is to move away from synchronous way of accessing API instance and provide UX incentive to use `window.ipfs.enable` instead. When called without any arguments, command will just return API instance equal to the old `window.ipfs` or throw an error if IPFS Proxy is disabled in Preferences. When called with options object `{ commands: ['id','peers'] }` access rights for specified commands will be validated: - if any of the commands is denied or blocked, function will throw - if any of the commands require user approval, user will be presented with a single prompt dialog that lists all requested permissions and URL that requests them - if user approves, ACLs are saved and future calls will not trigger prompt - if user denies, ACLs are saved and an error is thrown for current and all future executions (unless user removed scope from blacklist) TODO (to be addressed in future commits) - add deprecation warning to API calls executed on `window.ipfs` - improve UX of permission dialog - add ability to return `ipfsx` version fo the API - disable `window.ipfs` injection via manifest in Chromium - stop exposing methods on `window.ipfs` - minimize the size of content script responsible for `window.ipfs` - lazy-init IPFS Proxy client on first call to `window.ipfs.enable()`
Configuration menu - View commit details
-
Copy full SHA for b0110a0 - Browse repository at this point
Copy the full SHA b0110a0View commit details
Commits on Dec 13, 2018
-
fix(build): regenerate yarn.lock
- also switch to terser-webpack-plugin
Configuration menu - View commit details
-
Copy full SHA for fb27d28 - Browse repository at this point
Copy the full SHA fb27d28View commit details
Commits on Dec 14, 2018
-
chore: pre-api-whitelist → pre-command
acl and api looked too similar and made code hard to follow, ipfs api core uses 'command' term to identify each endpoint so we follow that practice here
Configuration menu - View commit details
-
Copy full SHA for a8db570 - Browse repository at this point
Copy the full SHA a8db570View commit details
Commits on Dec 16, 2018
-
refactor(window.ipfs): backward-compatible errors
To avoid breaking changes we should deprecate old error codes first. This commit: - restores `permission` attribute and adds a deprecation warning when it is accessed. - adds error `code` to simplify error handling and alight convention with js-ipfs - updates docs
Configuration menu - View commit details
-
Copy full SHA for 19a9577 - Browse repository at this point
Copy the full SHA 19a9577View commit details -
feat(window.ipfs): opt-in ipfsx experiment
This adds an opt-in ipfsx experiment. In short, if `experiments:{ipfsx:true}` is passed `window.ipfs.enable` will return IPFS API instance wrapped in ipfsx prototype from https://github.com/ipfs-shipyard/ipfsx ``` let ipfs = await window.ipfs.enable({ commands: ['add','files.addPullStream'], experiments: { ipfsx: true } }) ```
Configuration menu - View commit details
-
Copy full SHA for b633eb4 - Browse repository at this point
Copy the full SHA b633eb4View commit details
Commits on Jan 3, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 690ad80 - Browse repository at this point
Copy the full SHA 690ad80View commit details -
fix(privacy): remove ACL whitelist for window.ipfs
This change means no command can be run without explicit approval from the user. Rationale can be found in #619 (comment)
Configuration menu - View commit details
-
Copy full SHA for 756b177 - Browse repository at this point
Copy the full SHA 756b177View commit details
Commits on Jan 7, 2019
-
Configuration menu - View commit details
-
Copy full SHA for f3e9c6c - Browse repository at this point
Copy the full SHA f3e9c6cView commit details