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

Add fs read permission (don't squash) #1689

Merged
merged 6 commits into from
Feb 8, 2019
Merged

Conversation

dsseng
Copy link
Contributor

@dsseng dsseng commented Feb 5, 2019

Fixes #1225;

  • Add tests
    /cc @ry

tools/unit_tests.py Show resolved Hide resolved
@fewf fewf mentioned this pull request Feb 5, 2019
@dsseng
Copy link
Contributor Author

dsseng commented Feb 6, 2019

@ry please don't squash, @fewf should be credited for his work!

@dsseng dsseng changed the title Add fs read permission Add fs read permission (don't squash) Feb 6, 2019
@ry
Copy link
Member

ry commented Feb 7, 2019

We're getting this error in CI:

$ ./tools/test_format.py
/Users/travis/build/denoland/deno/target/release/deno --allow-read --allow-run tools/format.ts
Cannot resolve module "--allow-read --allow-run" from "."

@dsseng
Copy link
Contributor Author

dsseng commented Feb 7, 2019

@ry fixed

js/read_dir_test.ts Outdated Show resolved Hide resolved
@fewf
Copy link
Contributor

fewf commented Feb 7, 2019

I have a fix for what @J2P caught in a PR into this branch dsseng#2 .

I think it could be misleading that after giving permission to a prompt that says Deno requests read access to {filename}. Grant?, I've now given permission to the script to read all of my filesystem. (This applies to the write permission prompt too). To resolve this, granting permission through the prompt could give a one-time permission to the script, or the prompt could read something like "Deno requests read access to your filesystem. Grant?"

@ry
Copy link
Member

ry commented Feb 7, 2019

To resolve this, granting permission through the prompt could give a one-time permission to the script, or the prompt could read something like "Deno requests read access to your filesystem. Grant?"

I agree - but let's fix that in a separate PR - because the same applies to allow-write too

@ry
Copy link
Member

ry commented Feb 7, 2019

@fewf I've pushed your patch

@ry
Copy link
Member

ry commented Feb 8, 2019

Hoping to land this one tomorrow - but it needs a few more fixes to go green.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM - very nice work @sh7dm and @fewf !

I'm sure this is going to break a lot of code - but it's better to do this now than 6 months from now.

@ry ry merged commit 9ab0338 into denoland:master Feb 8, 2019
ry added a commit to ry/deno that referenced this pull request Feb 9, 2019
- Add deps to --info output (denoland#1720)
- Add --allow-read (denoland#1689)
- Add deno.isTTY() (denoland#1622)
- Add emojis to permission prompts (denoland#1684)
- Add basic WebAssembly support (denoland#1677)
- Add `NO_COLOR` support https://no-color.org/ (denoland#1716)
- Add color exceptions (denoland#1698)
- Fix: do not load cache files when recompile flag is set (denoland#1695)
- Upgrade V8 to 7.4.98 (denoland#1640)
ry added a commit that referenced this pull request Feb 9, 2019
- Add deps to --info output (#1720)
- Add --allow-read (#1689)
- Add deno.isTTY() (#1622)
- Add emojis to permission prompts (#1684)
- Add basic WebAssembly support (#1677)
- Add `NO_COLOR` support https://no-color.org/ (#1716)
- Add color exceptions (#1698)
- Fix: do not load cache files when recompile flag is set (#1695)
- Upgrade V8 to 7.4.98 (#1640)
@dsseng dsseng deleted the read-permission branch February 9, 2019 05:38
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.

None yet

4 participants