fix(permissions): preserve canonical granted scopes

This commit is contained in:
2026-07-20 20:03:11 +02:00
parent ab07075a67
commit 1c8e18e109
2 changed files with 12 additions and 1 deletions

View File

@@ -24,6 +24,12 @@ class PermissionCatalogContractTests(unittest.TestCase):
self.assertIn("files:upload", scopes)
self.assertIn("mail_servers:test", scopes)
def test_expand_scopes_preserves_explicit_canonical_scope_with_legacy_alias(self) -> None:
scopes = access_catalog.expand_scopes(("files:file:read",))
self.assertIn("files:file:read", scopes)
self.assertIn("files:read", scopes)
if __name__ == "__main__":
unittest.main()