Compare commits
2
Commits
ab07075a67
...
90d8f65835
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90d8f65835 | ||
|
|
1c8e18e109 |
@@ -100,7 +100,12 @@ def expand_scopes(scopes: Iterable[str], *, include_unknown: bool = True) -> lis
|
||||
for alias in compatible_required_scopes(scope):
|
||||
if alias != scope:
|
||||
expanded.add(alias)
|
||||
if include_unknown and not matched:
|
||||
# Preserve explicitly granted scopes in the presentation set. A
|
||||
# canonical module scope can still match its legacy compatibility
|
||||
# alias when the providing module is not loaded; treating that match
|
||||
# as proof that the original scope is known would otherwise replace
|
||||
# the canonical grant with only the deprecated alias.
|
||||
if include_unknown or scope in catalog:
|
||||
expanded.add(scope)
|
||||
return sorted(expanded)
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -108,6 +108,7 @@ export const generatedTranslations: PlatformTranslations = {
|
||||
"i18n:govoplan-access.explain_access_for_value.3af96e47": "Explain access for {value0}",
|
||||
"i18n:govoplan-access.explicit_allow_is_unavailable_for.8d05fd4a": "Explicit allow is unavailable for",
|
||||
"i18n:govoplan-access.explicitly_deny.17ad945a": "Explicitly deny",
|
||||
"i18n:govoplan-access.available.7c62a142": "Available",
|
||||
"i18n:govoplan-access.file_connections.1e362326": "File connections",
|
||||
"i18n:govoplan-access.files_module_unavailable.0ee90db1": "Files module unavailable",
|
||||
"i18n:govoplan-access.files.6ce6c512": "Files",
|
||||
@@ -119,6 +120,7 @@ export const generatedTranslations: PlatformTranslations = {
|
||||
"i18n:govoplan-access.function_role_mapping_help.0cf9996a": "The source module and function ID identify an accepted external function fact. Access grants the selected tenant role only while IDM reports an active accepted assignment for that fact.",
|
||||
"i18n:govoplan-access.function_role_mapping_updated.76020443": "Function mapping updated.",
|
||||
"i18n:govoplan-access.function_role_mappings.2b64e9c3": "Function mappings",
|
||||
"i18n:govoplan-access.map_accepted_function_facts_to_tenant_roles_.7581e5cf": "Map accepted function facts to tenant roles.",
|
||||
"i18n:govoplan-access.general.9239ee2c": "General",
|
||||
"i18n:govoplan-access.global_account_details.0a0cf240": "Global account details",
|
||||
"i18n:govoplan-access.global_account_value_created.5100e467": "Global account {value0} created.",
|
||||
@@ -456,6 +458,7 @@ export const generatedTranslations: PlatformTranslations = {
|
||||
"i18n:govoplan-access.explain_access_for_value.3af96e47": "Zugriff fuer {value0} erklaeren",
|
||||
"i18n:govoplan-access.explicit_allow_is_unavailable_for.8d05fd4a": "Explicit allow is unavailable for",
|
||||
"i18n:govoplan-access.explicitly_deny.17ad945a": "Explicitly deny",
|
||||
"i18n:govoplan-access.available.7c62a142": "Verfuegbar",
|
||||
"i18n:govoplan-access.file_connections.1e362326": "Dateiverbindungen",
|
||||
"i18n:govoplan-access.files_module_unavailable.0ee90db1": "Dateimodul nicht verfügbar",
|
||||
"i18n:govoplan-access.files.6ce6c512": "Dateien",
|
||||
@@ -467,6 +470,7 @@ export const generatedTranslations: PlatformTranslations = {
|
||||
"i18n:govoplan-access.function_role_mapping_help.0cf9996a": "Quellmodul und Funktions-ID identifizieren einen akzeptierten externen Funktionsfakt. Access gewährt die ausgewählte Mandantenrolle nur, solange IDM eine aktive akzeptierte Zuweisung für diesen Fakt meldet.",
|
||||
"i18n:govoplan-access.function_role_mapping_updated.76020443": "Funktionszuordnung aktualisiert.",
|
||||
"i18n:govoplan-access.function_role_mappings.2b64e9c3": "Funktionszuordnungen",
|
||||
"i18n:govoplan-access.map_accepted_function_facts_to_tenant_roles_.7581e5cf": "Akzeptierte Funktionsfakten Mandantenrollen zuordnen.",
|
||||
"i18n:govoplan-access.general.9239ee2c": "Allgemein",
|
||||
"i18n:govoplan-access.global_account_details.0a0cf240": "Global account details",
|
||||
"i18n:govoplan-access.global_account_value_created.5100e467": "Global account {value0} created.",
|
||||
|
||||
Reference in New Issue
Block a user