charlymarchiaro commented on issue #36598:
URL: https://github.com/apache/superset/issues/36598#issuecomment-3881231124
Hi, thank you. Actually, I hadn't noticed this PR, it was created a couple
of days after this issue.
I fixed it extending the default `SupersetSecurityManager` directly in the
Helm chart:
```python
# Workaround for issue: https://github.com/apache/superset/issues/36598
class GuestUser2(GuestUser):
def __init__(self, user: GuestUser):
self.is_guest_user = user.is_guest_user
self.active = user.active
self.guest_token = user.guest_token
self.username = user.username
self.first_name = user.first_name
self.last_name = user.last_name
self.roles = user.roles
self.groups = user.groups
self.resources = user.resources
self.rls = user.rls
@property
def is_active(self):
return True
class CustomSsoSecurityManager(SupersetSecurityManager):
# [...]
def get_guest_user_from_token(self, token: GuestToken) -> GuestUser:
user = self.guest_user_cls(
token=token,
roles=[self.find_role(get_conf()["GUEST_ROLE_NAME"])],
)
# Workaround for issue:
https://github.com/apache/superset/issues/36598
return GuestUser2(user)
```
I will test it soon, thanks.
--
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]