-
Notifications
You must be signed in to change notification settings - Fork 16.6k
fix(security): add missing active attribute to GuestUser class #35507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(security): add missing active attribute to GuestUser class #35507
Conversation
…User' object has no attribute 'active'
Code Review Agent Run #24bed3Actionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've completed my review and didn't find any issues.
Files scanned
| File Path | Reviewed |
|---|---|
| superset/security/guest_token.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #35507 +/- ##
===========================================
+ Coverage 0 71.87% +71.87%
===========================================
Files 0 589 +589
Lines 0 43576 +43576
Branches 0 4713 +4713
===========================================
+ Hits 0 31322 +31322
- Misses 0 11018 +11018
- Partials 0 1236 +1236
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Duplicate PR. Pr #35454 already addresses it. |
SUMMARY
Fixes a SupersetApiError where 'GuestUser' object has no attribute 'active' occurred when using guest authentication in embedded dashboards.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
Set up Superset with embedded dashboard configuration
Create a guest token for embedded dashboard access
Access an embedded dashboard using guest authentication
Verify that the dashboard loads without the 'GuestUser' object has no attribute 'active' error
Confirm that guest user authentication flows work properly throughout the application
Changes made:
Added self.active = True to the GuestUser.init method since guest users are active by definition (they have valid authentication tokens)
Added is_active property that returns self.active to match the Flask-AppBuilder User model interface
Added proper documentation explaining the purpose of these attributes
This ensures GuestUser objects provide the same authentication interface as regular users for attributes relevant to guest authentication, while maintaining the distinction that guest users are temporary and don't have database-persisted attributes.
ADDITIONAL INFORMATION