mirror of
https://github.com/gravitational/teleport
synced 2024-10-21 17:53:28 +00:00
20c04df369
* Add tests for ParseTeleportRoles Updates #9752 * Be more tolerant when parsing system roles. Our original attempt at canonicalizing roles didn't work for system roles using camelcase, resulting in an awkward user experience. Here we maintain a mapping of allowed inputs to their corresponding system roles, and perform a case-insensitive lookup. This allows us to support camelcase roles, and has the advantage of permitting _ word separators as well. Fixes #9752 * Refactor *SystemRole.Check() Rather than having to list each role here, we rely on the new roleMappings set to validate the role. Additionally, remove the LegacyClusterTokenType role. This change is guaranteed to be backwards compatible because we check for RoleTrustedCluster everywhere we were checking for LegacyClusterTokenType, and our roleMappings will convert the old string that represented LegacyClusterTokenType to RoleTrustedCluster. |
||
---|---|---|
.. | ||
tctl | ||
teleport | ||
tsh |