Rename set-column-types action to et-column-type

Refs https://github.com/simonw/datasette/pull/2674#issuecomment-4085015792
This commit is contained in:
Simon Willison 2026-03-18 12:18:48 -07:00
commit 2b06da29a1
7 changed files with 18 additions and 20 deletions

View file

@ -191,7 +191,7 @@ def test_auth_create_token(
"all:view-query",
"database:fixtures:drop-table",
"resource:fixtures:foreign_key_references:insert-row",
"resource:fixtures:facetable:set-column-types",
"resource:fixtures:facetable:set-column-type",
}
)
# Now try actually creating one
@ -430,7 +430,7 @@ async def test_root_with_root_enabled_gets_all_permissions(ds_client):
assert (
await ds_client.ds.allowed(
action="set-column-types",
action="set-column-type",
resource=TableResource("fixtures", "facetable"),
actor=root_actor,
)
@ -504,9 +504,9 @@ async def test_root_without_root_enabled_no_special_permissions(ds_client):
assert (
await ds_client.ds.allowed(
action="set-column-types",
action="set-column-type",
resource=TableResource("fixtures", "facetable"),
actor=root_actor,
)
is not True
), "Root without root_enabled should not automatically get set-column-types"
), "Root without root_enabled should not automatically get set-column-type"

View file

@ -170,7 +170,7 @@ async def test_get_action(ds_client):
"vt",
"view-table",
"sct",
"set-column-types",
"set-column-type",
):
action = ds.get_action(name_or_abbr)
if "-" in name_or_abbr:

View file

@ -831,19 +831,19 @@ PermConfigTestCase = collections.namedtuple(
resource=("perms_ds_one", "t1"),
expected_result=True,
),
# set-column-types on specific table
# set-column-type on specific table
PermConfigTestCase(
config={
"databases": {
"perms_ds_one": {
"tables": {
"t1": {"permissions": {"set-column-types": {"id": "user"}}}
"t1": {"permissions": {"set-column-type": {"id": "user"}}}
}
}
}
},
actor={"id": "user"},
action="set-column-types",
action="set-column-type",
resource=("perms_ds_one", "t1"),
expected_result=True,
),