sections
1 row where page = "plugin_hooks", references = "[]" and title = "Allow Alice to view a specific table"
This data as json, CSV (advanced)
Suggested facets: breadcrumbs (array)
| id ▼ | page | ref | title | content | breadcrumbs | references |
|---|---|---|---|---|---|---|
| plugin_hooks:allow-alice-to-view-a-specific-table | plugin_hooks | allow-alice-to-view-a-specific-table | Allow Alice to view a specific table | This plugin grants the actor with id == "alice" permission to perform the view-table action against the sales table inside the accounting database. from datasette import hookimpl from datasette.permissions import PermissionSQL @hookimpl def permission_resources_sql(datasette, actor, action): if action != "view-table": return None if not actor or actor.get("id") != "alice": return None return PermissionSQL( sql=""" SELECT 'accounting' AS parent, 'sales' AS child, 1 AS allow, 'alice can view accounting/sales' AS reason """, ) | ["Plugin hooks", "permission_resources_sql(datasette, actor, action)", "Permission plugin examples"] | [] |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [sections] ( [id] TEXT PRIMARY KEY, [page] TEXT, [ref] TEXT, [title] TEXT, [content] TEXT, [breadcrumbs] TEXT, [references] TEXT );