You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2026/05/27 00:00:32 UTC
(superset) 20/29: fix(mcp): use class-bound attribute in joinedload for group roles
This is an automated email from the ASF dual-hosted git repository.
aminghadersohi pushed a commit to branch work-pr-39604
in repository https://gitbox.apache.org/repos/asf/superset.git
commit ab5e42be8a4fb3fdb675e618569eab6386eae10a
Author: Amin Ghadersohi <am...@gmail.com>
AuthorDate: Fri May 15 00:05:49 2026 +0000
fix(mcp): use class-bound attribute in joinedload for group roles
Replace string-based joinedload("roles") with the class-bound
self.group_model.roles attribute, consistent with how joinedload is
used elsewhere in Superset and forward-compatible with SQLAlchemy's
deprecation of string-based relationship names.
---
superset/security/manager.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset/security/manager.py b/superset/security/manager.py
index 982c2c46e8a..adb452a9d3b 100644
--- a/superset/security/manager.py
+++ b/superset/security/manager.py
@@ -3185,7 +3185,7 @@ class SupersetSecurityManager( # pylint: disable=too-many-public-methods
"""
eager = [
joinedload(self.user_model.roles),
- joinedload(self.user_model.groups).joinedload("roles"),
+ joinedload(self.user_model.groups).joinedload(self.group_model.roles),
]
if username:
try: