irodriguez-nebustream opened a new pull request, #35507: URL: https://github.com/apache/superset/pull/35507
### 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 <img width="2160" height="1486" alt="image" src="https://github.com/user-attachments/assets/7d5193af-0fd1-45ab-9d4d-68c59feb548c" /> ### 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](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) to the [GuestUser.__init__](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) method since guest users are active by definition (they have valid authentication tokens) Added [is_active](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) property that returns [self.active](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) to match the Flask-AppBuilder User model interface Added proper documentation explaining the purpose of these attributes This ensures [GuestUser](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html) 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 <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
