Skip to content

Commit

Permalink
fixed guest role permissions (apache#21208)
Browse files Browse the repository at this point in the history
  • Loading branch information
sinhashubham95 committed Aug 28, 2022
1 parent c61a507 commit d408393
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions superset/security/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1826,6 +1826,9 @@ def get_permissions(
if user.is_anonymous:
public_role = current_app.config.get("AUTH_ROLE_PUBLIC")
query = query.filter(Role.name == public_role)
elif self.is_guest_user(user):
guest_role = current_app.config.get("GUEST_ROLE_NAME")
query = query.filter(Role.name == guest_role)
else:
query = query.filter(assoc_user_role.c.user_id == user.id)

Expand Down

0 comments on commit d408393

Please sign in to comment.