Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion keepercommander/commands/enterprise.py
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,10 @@ def tree_node(node):
row.append(len(enforcements))
elif column == 'enforcements':
enforcements = role_enforcements.get(role_id, {})
row.append(list(enforcements.keys()))
if kwargs.get('format') == 'json':
row.append(dict(enforcements))
else:
row.append(list(enforcements.keys()))
elif column == 'managed_node_count':
row.append(len(managed_nodes_list))
elif column == 'managed_nodes':
Expand Down Expand Up @@ -1147,6 +1150,10 @@ def execute(self, params, **kwargs):
n.append(node)
else:
node_lookup[node_name] = [n, node]
if not node.get('parent_id'):
ent_name = params.enterprise['enterprise_name'].lower()
if ent_name not in node_lookup:
node_lookup[ent_name] = node

parent_id = None
if kwargs.get('parent'):
Expand Down
4 changes: 2 additions & 2 deletions keepercommander/service/util/request_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ def process_file_data(request_data: Dict[str, Any], command: str) -> Tuple[str,
# Check if command contains FILEDATA placeholder and request has filedata
if "FILEDATA" in command and "filedata" in request_data:
filedata = request_data.get("filedata")
if not isinstance(filedata, dict):
logger.warning("filedata must be a JSON object")
if not isinstance(filedata, (dict, list)):
logger.warning("filedata must be a JSON object or array")
return processed_command, temp_files

try:
Expand Down