diff --git a/tests/test_permissions.py b/tests/test_permissions.py index e40d8c99..64b86dd7 100644 --- a/tests/test_permissions.py +++ b/tests/test_permissions.py @@ -1126,41 +1126,32 @@ async def test_view_table_token_can_access_table(perms_ds): ({"a": ["vi"]}, "get", "/perms_ds_one/t1/1.json", None, 403), ({"a": ["vi"]}, "get", "/perms_ds_one/v1.json", None, 403), # Restricted to just view-database - pytest.param( + ( {"a": ["vd"]}, "get", "/.json", None, - 200, - marks=pytest.mark.xfail( - reason="Actor restrictions need additional work, refs #2534" - ), - ), # Can see instance too + 403, + ), # Cannot see instance (no upward cascading) ({"a": ["vd"]}, "get", "/perms_ds_one.json", None, 200), ({"a": ["vd"]}, "get", "/perms_ds_one/t1.json", None, 403), ({"a": ["vd"]}, "get", "/perms_ds_one/t1/1.json", None, 403), ({"a": ["vd"]}, "get", "/perms_ds_one/v1.json", None, 403), # Restricted to just view-table for specific database - pytest.param( + ( {"d": {"perms_ds_one": ["vt"]}}, "get", "/.json", None, - 200, - marks=pytest.mark.xfail( - reason="Actor restrictions need additional work, refs #2534" - ), - ), # Can see instance - pytest.param( + 403, + ), # Cannot see instance (no upward cascading) + ( {"d": {"perms_ds_one": ["vt"]}}, "get", "/perms_ds_one.json", None, - 200, - marks=pytest.mark.xfail( - reason="Actor restrictions need additional work, refs #2534" - ), - ), # and this database + 403, + ), # Cannot see database page (no upward cascading) ( {"d": {"perms_ds_one": ["vt"]}}, "get", @@ -1185,26 +1176,20 @@ async def test_view_table_token_can_access_table(perms_ds): 200, ), # view-table access to a specific table - pytest.param( + ( {"r": {"perms_ds_one": {"t1": ["vt"]}}}, "get", "/.json", None, - 200, - marks=pytest.mark.xfail( - reason="Actor restrictions need additional work, refs #2534" - ), - ), - pytest.param( + 403, + ), # Cannot see instance (no upward cascading) + ( {"r": {"perms_ds_one": {"t1": ["vt"]}}}, "get", "/perms_ds_one.json", None, - 200, - marks=pytest.mark.xfail( - reason="Actor restrictions need additional work, refs #2534" - ), - ), + 403, + ), # Cannot see database page (no upward cascading) ( {"r": {"perms_ds_one": {"t1": ["vt"]}}}, "get",