theromsh opened a new issue, #28029:
URL: https://github.com/apache/superset/issues/28029

   ### Bug description
   
   We are using apache-superset version 3.0.3
   When a user that is not logged in tries to reach a dashboard link (e.g: 
https://<superset-domain>/superset/dashboard/<dashboard_id>/) he get Internal 
server error (500) 
   The error message in logs 
   
   > Traceback (most recent call last):
     File 
\"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/flask/app.py\",
 line 1823, in full_dispatch_request
       rv = self.dispatch_request()
     File 
\"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/flask/app.py\",
 line 1799, in dispatch_request
       return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
     File 
\"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/flask_appbuilder/security/decorators.py\",
 line 137, in wraps
       return f(self, *args, **kwargs)
     File 
\"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/superset/utils/log.py\",
 line 253, in wrapper
       value = f(*args, add_extra_log_payload=log, **kwargs)
     File 
\"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/superset/views/core.py\",
 line 898, in dashboard
       \"user\": bootstrap_user_data(g.user, include_perms=True),
     File 
\"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/superset/views/utils.py\",
 line 97, in bootstrap_user_data
       roles, permissions = get_permissions(user)
     File 
\"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/superset/views/utils.py\",
 line 111, in get_permissions
       roles_permissions = security_manager.get_user_roles_permissions(user)
     File 
\"/home/build/.pyzr/venvs/superset-bl5I_M_4-py3.10/lib/python3.10/site-packages/flask_appbuilder/security/sqla/manager.py\",
 line 420, in get_user_roles_permissions
       result[role.name] = []
   AttributeError: 'NoneType' object has no attribute 'name'
   
   I think it's important to mention that are using Google/ Dex for 
authentication so we `SupersetSecurityManager` override with 
`CustomSsoSecurityManager` based on 
[this](https://superset.apache.org/docs/installation/configuring-superset/#custom-oauth2-configuration)
 doc 
   ![Screenshot 2024-04-15 at 9 51 
40](https://github.com/apache/superset/assets/31502199/6aac2036-22fe-4823-8f54-e31646eae8eb)
   
   
   
   ### How to reproduce the bug
   
   1. Go to a randomly superset's dashboard page 
   2. Copy this link
   3. Log out from your account 
   4. Go to the copied link 
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   3.1.2
   
   ### Python version
   
   3.10
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [ ] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [X] I have checked Superset's logs for errors and if I found a relevant 
Python stacktrace, I included it here as text in the "additional context" 
section.


-- 
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: notifications-unsubscr...@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to