2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-28 11:57:37 +00:00

Restore role-less group

If a group is missing a role,
coerce it to administrator
This commit is contained in:
Jarrod Johnson 2023-01-13 10:01:52 -05:00
parent 453d1f9ceb
commit bc452b9b9a

View File

@ -1515,6 +1515,8 @@ class ConfigManager(object):
groupname = confluent.util.stringify(groupname)
if groupname in self._cfgstore['usergroups']:
raise Exception("Duplicate groupname requested")
if role is None:
role = 'Administrator'
for candrole in _validroles:
if candrole.lower().startswith(role.lower()):
role = candrole