From 445950d02a53f1b803af1692278523a12467d014 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 28 Jan 2020 10:05:04 -0500 Subject: [PATCH] Roll back library level force of role Doing collective and config restore breaks. The API will still prevent implicit role assumption. --- confluent_server/confluent/config/configmanager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/confluent_server/confluent/config/configmanager.py b/confluent_server/confluent/config/configmanager.py index efd3038f..bf3c0ded 100644 --- a/confluent_server/confluent/config/configmanager.py +++ b/confluent_server/confluent/config/configmanager.py @@ -1349,7 +1349,7 @@ class ConfigManager(object): _mark_dirtykey('usergroups', groupname, self.tenant) self._bg_sync_to_file() - def create_usergroup(self, groupname, role): + def create_usergroup(self, groupname, role="Administrator"): """Create a new user :param groupname: The name of the user group @@ -1365,7 +1365,7 @@ class ConfigManager(object): role) self._true_create_usergroup(groupname, role) - def _true_create_usergroup(self, groupname, role): + def _true_create_usergroup(self, groupname, role="Administrator"): if 'usergroups' not in self._cfgstore: self._cfgstore['usergroups'] = {} groupname = confluent.util.stringify(groupname) @@ -1440,7 +1440,7 @@ class ConfigManager(object): self._bg_sync_to_file() def create_user(self, name, - role, uid=None, displayname=None, + role="Administrator", uid=None, displayname=None, attributemap=None): """Create a new user @@ -1459,7 +1459,7 @@ class ConfigManager(object): role, uid, displayname, attributemap) self._true_create_user(name, role, uid, displayname, attributemap) - def _true_create_user(self, name, role, uid=None, + def _true_create_user(self, name, role="Administrator", uid=None, displayname=None, attributemap=None): if 'idmap' not in _cfgstore['main']: _cfgstore['main']['idmap'] = {}