mirror of
https://github.com/simonw/datasette.git
synced 2026-06-02 07:07:00 +02:00
datasette.yml can no longer set a query to private
Private means it has an owner, and the config does not let you say who the owner is - plus configured queries should not be possible to edit or delete in the UI so having an owner makes even less sense. You can still make configured queries visible to specific people using regular view-query permissions.
This commit is contained in:
parent
dd73eb018d
commit
b6e9b18990
2 changed files with 2 additions and 1 deletions
|
|
@ -109,7 +109,6 @@ async def save_queries_from_config(datasette: Any) -> None:
|
|||
fragment=query_config.get("fragment"),
|
||||
parameters=query_config.get("params"),
|
||||
is_write=bool(query_config.get("write")),
|
||||
is_private=bool(query_config.get("is_private")),
|
||||
is_trusted=bool(query_config.get("is_trusted", True)),
|
||||
source="config",
|
||||
on_success_message=query_config.get("on_success_message"),
|
||||
|
|
|
|||
|
|
@ -191,6 +191,8 @@ async def test_config_queries_imported_to_internal_table():
|
|||
"title": "Configured query",
|
||||
"description_html": "<p>Configured HTML</p>",
|
||||
"params": ["name"],
|
||||
# Configured queries are always public; this is ignored.
|
||||
"is_private": True,
|
||||
"on_success_message_sql": "select 'Hello ' || :name",
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue