codeant-ai-for-open-source[bot] commented on code in PR #43066:
URL: https://github.com/apache/superset/pull/43066#discussion_r3768915403
##########
superset/utils/filters.py:
##########
@@ -78,7 +78,12 @@ def guest_embedded_dashboard_filter() ->
Optional[ColumnElement[bool]]:
# Route each id kind to its own column and OR them — a plain int sent to
the
# uuid-typed column would raise a bind/type error.
uuid_ids = [id_ for id_ in ids if is_uuid(id_)]
- int_ids = [id_ for id_ in ids if not is_uuid(id_)]
+ # A non-uuid id is a numeric dashboard id or a slug; route slugs to the
slug
+ # column instead of the int id column (which would raise a cast error). The
+ # data path (has_guest_access) stays the authorization gate.
+ non_uuid_ids = [id_ for id_ in ids if not is_uuid(id_)]
+ int_ids = [id_ for id_ in non_uuid_ids if str(id_).isdigit()]
+ slug_ids = [id_ for id_ in non_uuid_ids if not str(id_).isdigit()]
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> Keep using canonical decimal-string classification for dashboard IDs in
guest access filters; do not replace it with an integer-convertibility helper
when authorization compares resource IDs by string equality.
**Applied to:**
- `superset/utils/filters.py`
---
💡 *To manage or update this instruction, visit: [CodeAnt AI
Settings](https://app.codeant.ai/org/settings/learnings)*
--
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]