bito-code-review[bot] commented on PR #44857:
URL: https://github.com/apache/superset/pull/44857#issuecomment-5924845671

   <!-- Bito Reply -->
   The flagged issue is already addressed by the changes in this pull request. 
The code in `superset/security/password_change.py` has been refactored to use 
`_logout_fallback_candidates(security_manager)`, which dynamically resolves the 
correct logout endpoint based on the registered `auth_view` and includes 
`AuthDBView.logout` as a fallback, ensuring it is not hardcoded to a 
potentially nonexistent view. No further action is required for this specific 
comment.
   
   **superset/security/password_change.py**
   ```
   def _logout_fallback_candidates(security_manager: Any) -> list[str]:
       """Build the ordered list of logout endpoints to try as a last resort."""
       candidates = []
       auth_view = getattr(security_manager, "auth_view", None)
       # Only redirect to the registered auth view's logout if that view is
       # itself exempt from this hook; otherwise the redirect would loop.
       if (
           auth_view is not None
           and getattr(auth_view, "endpoint", None) in _EXEMPT_VIEW_CLASSES
       ):
           candidates.append(f"{auth_view.endpoint}.logout")
       candidates.append("AuthDBView.logout")
       return candidates
   ```


-- 
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]

Reply via email to