{"ok": true, "database": "docs", "table": "sections", "rows": [{"id": "internals:datasette-allowed-many", "page": "internals", "ref": "datasette-allowed-many", "title": "await .allowed_many(*, actions, resource, actor=None)", "content": "actions  - list of strings \n                         \n                             The names of the actions to permission check. \n                         \n                     \n                     \n                         resource  - Resource object \n                         \n                             A Resource object representing the database, table, or other resource that each action is checked against. Omit for global actions. \n                         \n                     \n                     \n                         actor  - dictionary, optional \n                         \n                             The authenticated actor. This is usually  request.actor . Defaults to  None  for unauthenticated requests. \n                         \n                     \n                 \n                 Checks several actions against the same resource for the same actor, returning a dictionary mapping each action name to  True  or  False . The whole batch - including any actions pulled in through  also_requires  dependencies - is resolved with a single SQL query against the internal database, so this is much faster than calling  datasette.allowed()  once per action. \n                 Example usage: \n                 from datasette.resources import TableResource\n\nresults = await datasette.allowed_many(\n    actions=[\"insert-row\", \"delete-row\", \"drop-table\"],\n    resource=TableResource(\n        database=\"fixtures\", table=\"facetable\"\n    ),\n    actor=request.actor,\n)\n# {\"insert-row\": True, \"delete-row\": True, \"drop-table\": False} \n                 Each result is stored in the per-request permission check cache, so subsequent  datasette.allowed()  calls for the same checks within the same request are served from that cache. Datasette uses this before running the  table_actions  and  database_actions  plugin hooks: it resolves every registered table-level action against the current table and every database-level action against its database first, which means  allowed()  calls made by those plugin hooks are usually served from the cache instead of triggering additional queries. \n                 Actions for which no plugin provides any permission rules are resolved to  False  directly, without being included in the SQL query at all.", "breadcrumbs": "[\"Internals for plugins\", \"Datasette class\"]", "references": "[]"}], "primary_keys": ["id"], "primary_key_values": ["internals:datasette-allowed-many"], "query_ms": 2.25540398969315, "truncated": false}