goingforstudying-ctrl commented on code in PR #40746:
URL: https://github.com/apache/superset/pull/40746#discussion_r3408535827
##########
superset/mcp_service/user/schemas.py:
##########
@@ -278,7 +306,11 @@ def serialize_user_object(
user_roles = getattr(user, "roles", None)
if user_roles is not None:
try:
- roles = [r.name for r in user_roles if hasattr(r, "name")]
+ roles = [
+ escape_llm_context_delimiters(r.name)
+ for r in user_roles
+ if hasattr(r, "name") and isinstance(r.name, str)
+ ]
Review Comment:
Fixed in latest commit. Converted the list comprehension to a per-item
for-loop so one detached role no longer drops all valid role names, matching
the pattern used in _extract_role_names.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]