Nested permission checks for all views, refs #811

This commit is contained in:
Simon Willison 2020-06-07 13:03:08 -07:00
commit 4340845754
6 changed files with 97 additions and 48 deletions

View file

@ -22,7 +22,7 @@ class IndexView(BaseView):
self.ds = datasette
async def get(self, request, as_format):
await self.check_permission(request, "view-index")
await self.check_permission(request, "view-instance")
databases = []
for name, db in self.ds.databases.items():
table_names = await db.table_names()