fix(permissions): preserve canonical granted scopes
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user