mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Handle non-initials in permission_allowed_actor_restrictions, closes #1956
This commit is contained in:
parent
1a3dcf4943
commit
e238df3959
2 changed files with 27 additions and 5 deletions
|
|
@ -609,6 +609,22 @@ DEF = "USE_DEFAULT"
|
|||
"t2",
|
||||
False,
|
||||
),
|
||||
# non-abbreviations should work too
|
||||
({"id": "t", "_r": {"a": ["view-instance"]}}, "view-instance", None, None, DEF),
|
||||
(
|
||||
{"id": "t", "_r": {"d": {"one": ["view-database"]}}},
|
||||
"view-database",
|
||||
"one",
|
||||
None,
|
||||
DEF,
|
||||
),
|
||||
(
|
||||
{"id": "t", "_r": {"r": {"one": {"t1": ["view-table"]}}}},
|
||||
"view-table",
|
||||
"one",
|
||||
"t1",
|
||||
DEF,
|
||||
),
|
||||
),
|
||||
)
|
||||
async def test_actor_restricted_permissions(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue