Skip to content

Commit

Permalink
Handled empty email header (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kosta91 authored Mar 11, 2024
1 parent 2c080a5 commit 75a4a16
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion superset/header_auth_security_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def __get_or_create_custom_role(self, role_name: str):
role = ab_security_manager.find_role(role_name)
if role:
return role

alpha_role = ab_security_manager.find_role("Alpha")
if alpha_role:
alpha_permissions = alpha_role.permissions
Expand Down Expand Up @@ -149,6 +149,9 @@ def __create_or_update_user(self, username):

# Get user info from request headers
email = self.__get_email_from_request(request)
if email is None:
email = f'{username}@email.notfound'

first_name = username
last_name = "-"
is_platform_admin = self.__PLATFORM_ADMIN_ROLE in self.__get_groups_from_request(request)
Expand Down

0 comments on commit 75a4a16

Please sign in to comment.