-
Notifications
You must be signed in to change notification settings - Fork 327
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
Adds custom proxy access dialog #382
Adds custom proxy access dialog #382
Conversation
<p class="sans-serif f6 lh-copy charcoal-muted"> | ||
<label> | ||
<input type="checkbox" checked=${state.remember} onclick=${onRememberToggle} class="mr1" /> | ||
Apply to all permissions for ${origin} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does Apply to all IPFS API permissions for
sound better or worse?
(It is more clear to me, but I am non-native speaker, so.. 🙃 )
@@ -72,7 +72,7 @@ | |||
"sinon": "4.1.2", | |||
"sinon-chrome": "2.2.1", | |||
"standard": "10.0.3", | |||
"uglifyify": "^4.0.5", | |||
"uglifyify": "4.0.5", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alanshaw I think you forgot to update yarn.lock. If I run npm run yarn-build
it modifies it:
--- a/yarn.lock
+++ b/yarn.lock
@@ -4374,7 +4374,7 @@ ipfs-block@^0.6.1, ipfs-block@~0.6.1:
dependencies:
cids "^0.5.2"
-ipfs-css@^0.1.0:
+[email protected]:
version "0.1.0"
resolved "https://registry.yarnpkg.com/ipfs-css/-/ipfs-css-0.1.0.tgz#0337e7e3aeddf391bbd1b7b7fb427f98b6ec5ca3"
@@ -9315,7 +9315,7 @@ uglify-to-browserify@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
-uglifyify@^4.0.5:
+[email protected]:
version "4.0.5"
resolved "https://registry.yarnpkg.com/uglifyify/-/uglifyify-4.0.5.tgz#49c1fca9828c10a5a8e8d70f191a95f7ab475911"
dependencies:
This is why Jenkins failed:
When you check the checkbox I'm implementing something like this: {
origin: { '*': true }
} Usually it would look like: {
origin: { 'files.add': true, 'object.new': false /* ... */ }
} There's some nuances to
Right now I'm leaning towards when you set |
Setting "allow all", I think it should remove more specific permissions, and just store If you hypothetically try to set a more specific permission, when If it should never be possible to set a more specific permission when a wildcard is already set, then an error would be appropriate. Right now that feels like an implicit rule just because of the way the ui is structured, but I don't think it's a rule we really care about. |
@lidel @olizilla @victorbjelkholm
EDIT: fonts are in and working |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @alanshaw, it is 👌 Awesome work! Works beautifully under Firefox 🚀
Is it ready to merge on your end? If so, see my 2 bikeshedding comments below.
ps. While testing this I noticed (unrelated) CSP warning and fixed it – just fetch my commits.
.gitignore
Outdated
@@ -11,3 +11,5 @@ crowdin.yml | |||
add-on/dist | |||
coverage | |||
.nyc_output | |||
add-on/fonts/* | |||
add-on/*.css |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move 3rd-party stuff copied from ipfs-css
and tachyons
(fonts, css) into separate namespace, eg. add-on/ui-kit/
or something like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add-on/src/lib/ipfs-proxy/pre-acl.js
Outdated
const { allow } = await requestAccess(origin, permission) | ||
access = await accessControl.setAccess(origin, permission, allow) | ||
const { allow, remember } = await requestAccess(origin, permission) | ||
access = await accessControl.setAccess(origin, remember ? '*' : permission, allow) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took me a moment to get it.. remember
does not seem to be a good description for what is happening here :)
Perhaps wildcard
would be a more intuitive name than remember
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
…p/ipfs-companion into feat/custom-proxy-access-dialog
@lidel good to merge? |
window.confirm
is not supported when called from a background script in Firefoxresolves #377