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

prepare_connection() plugin hook should accept optional datasette argument #678

Closed
simonw opened this issue Feb 22, 2020 · 3 comments
Closed

Comments

@simonw
Copy link
Owner

simonw commented Feb 22, 2020

I want to build a plugin that allows users to configure certain database columns to be "masked" - so the password column on a users table is never revealed, for example.

To do this, I need to use the conn.set_authorizer() SQLite mechanism. So the plugin needs to build off the prepare_connection(conn) hook. But that hook doesn't currently get passed datasette so it doesn't have a way of looking up its plugin configuration!

@simonw
Copy link
Owner Author

simonw commented Feb 22, 2020

While I'm at it, the hook should accept an optional database name argument as well.

simonw added a commit to simonw/datasette-mask-columns that referenced this issue Feb 22, 2020
@simonw
Copy link
Owner Author

simonw commented Feb 22, 2020

@simonw simonw closed this as completed Feb 22, 2020
@simonw simonw mentioned this issue Feb 22, 2020
3 tasks
@simonw
Copy link
Owner Author

simonw commented Feb 22, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant