HVF / franchise

🍟 a notebook sql client. what you get when have a lot of sequels.
https://franchise.cloud
MIT License
4k stars 261 forks source link

User is able to drop tables #26

Open jdrew1303 opened 6 years ago

jdrew1303 commented 6 years ago

Current behaviour:

Expected behaviour:

Possible solutions:

Application fixes:

Databases admin fixes:

grant select on database_name.* to 'read-only_user_name'@'%' identified by 'password';
antimatter15 commented 6 years ago

Franchise already bundles sqlite-parser, and we were looking into bundling your sqltraverse library for some cool query builder stuff.

MySQL and Postgres have somewhat different syntax than SQLite, so it remains an open question what the tool should do if the parser fails.

Clearly the right way to do this isn’t with a front end limitation. If the user shouldn’t be able to write to the database then that account shouldn’t have the privileges.

But I’m all for making it so that the user has to be extra careful if the tool detects that a query might write to the database. Perhaps making the user have to check a box that proves they’re aware of this.