experiment: ask for permission on file operations
commit6099fa7fb2a0a03bd0176ae546504eef21a095a0
authorKartik K. Agaram <vc@akkartik.com>
Wed, 6 Apr 2022 05:18:25 +0000 (5 22:18 -0700)
committerKartik K. Agaram <vc@akkartik.com>
Wed, 6 Apr 2022 05:26:43 +0000 (5 22:26 -0700)
tree8eb51be4394570f26360a74885abac964988831d
parent5b64c4b3bc41215ff02ba3db1540ab152f737639
experiment: ask for permission on file operations

I'm not quite sure how to think about asking for permissions with
respect to my red/orange/green color codes. On the one hand, it seems
safer than many alternatives. On the other hand, it's liable to lead to
fatigue and blindly allowing apps to do stuff. For now I consider ask to
be orange. Ask + network allowed = red in summary, though it's orange on
the permissions screen since there's more space to convey nuance. Then
again, nobody may heed the nuance. The summary up top on the permissions
screen is definitely still a work in progress. And there's a
chicken-and-egg problem here: I can't really get a good feel for
real-world bugs in the permissions screen until _other programmers_ are
building apps to use the permissions screen, but they're almost certain
to have a crappy time of it.

I considered introducing a primitive called ask() in the Lua
interpreter, but it doesn't really make sense to validate it and so on.
I'm also not really supporting mixing Ask with other features so far.

This is a major step towards turning my permissions screen into
spaghetti; monitoring closely.
src/teliva.c
src/teliva.h