You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2022/08/28 07:09:04 UTC
[superset] branch master updated: fixed guest role permissions (#21208)
This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new d408393ba9 fixed guest role permissions (#21208)
d408393ba9 is described below
commit d408393ba9bb6c81c661248521be93dd70c9e19b
Author: Shubham Sinha <si...@gmail.com>
AuthorDate: Sun Aug 28 12:38:41 2022 +0530
fixed guest role permissions (#21208)
---
superset/security/manager.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/superset/security/manager.py b/superset/security/manager.py
index 369c73fade..3a92feba4f 100644
--- a/superset/security/manager.py
+++ b/superset/security/manager.py
@@ -1826,6 +1826,9 @@ class SupersetSecurityManager( # pylint: disable=too-many-public-methods
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)