2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-23 01:53:28 +00:00

Roll back library level force of role

Doing collective and config restore breaks.  The API
will still prevent implicit role assumption.
This commit is contained in:
Jarrod Johnson 2020-01-28 10:05:04 -05:00
parent cf72cf2d8c
commit 445950d02a

View File

@ -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'] = {}