-
-
Notifications
You must be signed in to change notification settings - Fork 701
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
Example permissions plugin #818
Comments
Also fixed it so default permission checks run after plugin permission checks, refs #818
https://datasette.readthedocs.io/en/latest/plugins.html#permission-allowed-datasette-actor-action-resource has a couple of examples now. |
I want to build a plugin that does |
|
Problem with that is it's more of a The most interesting permissions plugin would be one that implements permissions against some kind of database schema, hence allowing admins to edit permissions through writable canned queries. |
I'm dropping this from the 0.44 milestone. |
Also documented policy that plugin hooks should not be shipped without a real example. Refs #818
New policy in 9f236c4 dictates that this should be in Milestone 0.44 after all:
|
What's a simple but useful plugin I could release that exercises this hook? Ideally one which executes permission checks against the database somehow. I could do a simplest-possible implementation of the idea in #801 (allow-by-query). |
plugins:
datasette-permissions-sql:
view-instance: |-
select count(*) from users where admin = 1 and id = :id |
https://github.com/simonw/datasette-permissions-sql is now released as a 0.1a here: https://pypi.org/project/datasette-permissions-sql/ |
To show how they work. Also useful to confirm how they interact with the default permissions.
The text was updated successfully, but these errors were encountered: