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

permission prompt #1081

Merged
merged 3 commits into from
Oct 27, 2018
Merged

permission prompt #1081

merged 3 commits into from
Oct 27, 2018

Conversation

ry
Copy link
Member

@ry ry commented Oct 24, 2018

No description provided.

@ry ry mentioned this pull request Oct 24, 2018
3 tasks
@ry ry changed the title Atty WIP permission prompt Oct 24, 2018
@hayd
Copy link
Contributor

hayd commented Oct 24, 2018

Nice cleanup!

@hayd
Copy link
Contributor

hayd commented Oct 24, 2018

Looks like pty is Unix only. Perhaps we should skip these tests on Windows for now?
There may be a workaround...

@ry
Copy link
Member Author

ry commented Oct 24, 2018

@piscisaureus Please review regarding testing a TTY in windows.
See tools/permission_prompt_test.py

@ry ry mentioned this pull request Oct 24, 2018
filename
));;
if r.is_ok() {
self.allow_write = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

I still think this behavior is a little weird: You're asked if it's okay for deno to write foo.txt, you say yes, and deno can write anything for the rest of time.

IMO for now we should not use the filename/domain arg until we have finer permissions, either:

  • "🔐 Deno requests write access. for the rest of execution.
  • "🔐 Deno requests write access to \"{}\"." but ask every time.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's fine for a first pass. This feature is about ergonomics and clicking "yes" a bunch of times is annoying. Maybe we can change the wording to reflect the fact that access is granted for the rest of execution.

@ry
Copy link
Member Author

ry commented Oct 26, 2018

emoji doesn't work in windows - leaving it out.

Bert tested windows manually - there's no easy way to test there. We're going to skip the test in Windows for now.

@ry ry changed the title WIP permission prompt permission prompt Oct 26, 2018
Copy link
Member

@piscisaureus piscisaureus left a comment

Choose a reason for hiding this comment

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

Looking good. The second patch is a bit weird -- does it change anything at all, it looks like it just moves some code around?

@ry ry merged commit 6adc87e into denoland:master Oct 27, 2018
@ry
Copy link
Member Author

ry commented Oct 27, 2018

@piscisaureus re second patch - importing pty on win fails - so the imports have to be inside the conditional.

ry added a commit to ry/deno that referenced this pull request Oct 27, 2018
- Add URLSearchParams (denoland#1049)
- Implement clone for FetchResponse (denoland#1054)
- Use content-type headers when importing from URLs. (denoland#1020)
- Use checkJs option, JavaScript will be type checked and users can
  supply JSDoc type annotations that will be enforced by Deno (denoland#1068)
- Add separate http/https cache dirs to DENO_DIR (denoland#971)
- Support https in fetch. (denoland#1100)
- Add chmod/chmodSync on unix (denoland#1088)
- Remove broken features: --deps and trace() (denoland#1103)
- Ergonomics: Prompt TTY for permission escalation (denoland#1081)
@ry ry mentioned this pull request Oct 27, 2018
ry added a commit that referenced this pull request Oct 27, 2018
- Add URLSearchParams (#1049)
- Implement clone for FetchResponse (#1054)
- Use content-type headers when importing from URLs. (#1020)
- Use checkJs option, JavaScript will be type checked and users can
  supply JSDoc type annotations that will be enforced by Deno (#1068)
- Add separate http/https cache dirs to DENO_DIR (#971)
- Support https in fetch. (#1100)
- Add chmod/chmodSync on unix (#1088)
- Remove broken features: --deps and trace() (#1103)
- Ergonomics: Prompt TTY for permission escalation (#1081)
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.

3 participants