mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Ran Black
This commit is contained in:
parent
66f2dbb64a
commit
60ed646d45
2 changed files with 8 additions and 4 deletions
|
|
@ -124,6 +124,7 @@ app_root = Path(__file__).parent.parent
|
||||||
@dataclasses.dataclass
|
@dataclasses.dataclass
|
||||||
class PermissionCheck:
|
class PermissionCheck:
|
||||||
"""Represents a logged permission check for debugging purposes."""
|
"""Represents a logged permission check for debugging purposes."""
|
||||||
|
|
||||||
when: str
|
when: str
|
||||||
actor: Optional[Dict[str, Any]]
|
actor: Optional[Dict[str, Any]]
|
||||||
action: str
|
action: str
|
||||||
|
|
@ -131,6 +132,7 @@ class PermissionCheck:
|
||||||
child: Optional[str]
|
child: Optional[str]
|
||||||
result: bool
|
result: bool
|
||||||
|
|
||||||
|
|
||||||
# https://github.com/simonw/datasette/issues/283#issuecomment-781591015
|
# https://github.com/simonw/datasette/issues/283#issuecomment-781591015
|
||||||
SQLITE_LIMIT_ATTACHED = 10
|
SQLITE_LIMIT_ATTACHED = 10
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -660,10 +660,12 @@ class CreateTokenView(BaseView):
|
||||||
tables = []
|
tables = []
|
||||||
for table_resource in allowed_tables:
|
for table_resource in allowed_tables:
|
||||||
if table_resource.parent == database_name:
|
if table_resource.parent == database_name:
|
||||||
tables.append({
|
tables.append(
|
||||||
"name": table_resource.child,
|
{
|
||||||
"encoded": tilde_encode(table_resource.child)
|
"name": table_resource.child,
|
||||||
})
|
"encoded": tilde_encode(table_resource.child),
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
database_with_tables.append(
|
database_with_tables.append(
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue