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
More permissions prompt options #1926
Conversation
Would this allow using a String rather than Boolean one day? E.g. allowing web by domain? #1639 |
Great idea Also allowing read for certain files / pattern? like |
Did a refactor of the permissions prompt tests. They are now semi-procedural I.E. test_yes_yes("read"). This should make them a little easier to maintain and update. I'm not completely sure if the |
…her test case no_prompt_allow
This is ready for review. |
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.
LGTM - very nice improvement
FYI the core integration patch #1938 introduces a lot of instability. In particular, I've had to disable to permission_prompt_test (among others) in order to get it to go green. I'm going to nevertheless land it today (after this one goes in).
def test(self): | ||
for test_type in self.test_types: | ||
test_name_base = "test_" + test_type | ||
wrap_test(test_name_base + "_allow_flag", self.test_allow_flag, |
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.
I think this would be clearer as a second for loop.
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.
It might look cleaner, but I think from a debugging perspective it's not worth removing that much explicitness from a test. This would likely only save a few lines. I will add some comments to wrap_test
.
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.
How so? if you debug then you can access the variable name.
Not sure what happened to CI on that last one, but I made some changes based on @hayd's feedback. Hopefully it passes this time. |
Added some new permissions prompt options, and gave better names to existing options. The existing options when you receive a permission prompt are: y for allow always(I thought this meant yes once for some time) and n for no once(give the program a permission denied error this time). This change adds two new options and renames the existing allow always option the new set of options are:
It might also make sense to remove the revoke commands, since this solves the same problems in a way that doesn't conflict with
--no-prompt
.