home / docs / sections

sections: internals:bypassing-permission-checks

This data as json

id page ref title content breadcrumbs references
internals:bypassing-permission-checks internals bypassing-permission-checks Bypassing permission checks All datasette.client methods accept an optional skip_permission_checks=True parameter. When set, all permission checks will be bypassed for that request, allowing access to any resource regardless of the configured permissions. This is useful for plugins and internal operations that need to access all resources without being subject to permission restrictions. Example usage: # Regular request - respects permissions response = await datasette.client.get( "/private-db/secret-table.json" ) # May return 403 Forbidden if access is denied # With skip_permission_checks - bypasses all permission checks response = await datasette.client.get( "/private-db/secret-table.json", skip_permission_checks=True, ) # Will return 200 OK and the data, regardless of permissions This parameter works with all HTTP methods ( get , post , put , patch , delete , options , head ) and the generic request method. Use skip_permission_checks=True with caution. It completely bypasses Datasette's permission system and should only be used in trusted plugin code or internal operations where you need guaranteed access to resources. ["Internals for plugins", "Datasette class", "datasette.client"] []
Powered by Datasette · Queries took 4.784ms