bito-code-review[bot] commented on code in PR #35454:
URL: https://github.com/apache/superset/pull/35454#discussion_r2399501460
##########
superset/security/guest_token.py:
##########
@@ -59,6 +59,7 @@ class GuestUser(AnonymousUserMixin):
"""
is_guest_user = True
+ active = True
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Flask-Login interface violation</b></div>
<div id="fix">
The added `active = True` class attribute does not implement the required
Flask-Login `is_active` property. Flask-Login expects user classes to provide
an `is_active` property (not a class attribute) that returns a boolean
indicating whether the user account is active. This mismatch will cause
authentication failures when Flask-Login checks `current_user.is_active` for
guest users. Replace the class attribute with a proper `@property` method
`is_active` that returns `True`, ensuring compatibility with Flask-Login's user
interface requirements.
</div>
<details>
<summary>
<b>Code suggestion</b>
</summary>
<blockquote>Check the AI-generated fix before applying</blockquote>
<div id="code">
```suggestion
is_guest_user = True
@property
def is_active(self) -> bool:
return True
```
</div>
</details>
</div>
<small><i>Code Review Run <a
href=https://github.com/apache/superset/pull/35454#issuecomment-3362187791>#fe6ce1</a></i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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]