This is an automated email from the ASF dual-hosted git repository.
rusackas 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 8b354b4b69 fix: Published Dashboard without charts don't show up for
non admin users (#20638)
8b354b4b69 is described below
commit 8b354b4b6999e5a2474fb94ffab6b8428c4d4e6e
Author: Diego Medina <[email protected]>
AuthorDate: Wed Jul 27 15:40:59 2022 -0300
fix: Published Dashboard without charts don't show up for non admin users
(#20638)
---
superset/dashboards/filters.py | 2 +-
superset/sql_parse.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/superset/dashboards/filters.py b/superset/dashboards/filters.py
index f765bc8ffd..8b4b8fe526 100644
--- a/superset/dashboards/filters.py
+++ b/superset/dashboards/filters.py
@@ -111,7 +111,7 @@ class DashboardAccessFilter(BaseFilter): # pylint:
disable=too-few-public-metho
datasource_perm_query = (
db.session.query(Dashboard.id)
- .join(Dashboard.slices)
+ .join(Dashboard.slices, isouter=True)
.filter(
and_(
Dashboard.published.is_(True),
diff --git a/superset/sql_parse.py b/superset/sql_parse.py
index d377986f56..ab2f044172 100644
--- a/superset/sql_parse.py
+++ b/superset/sql_parse.py
@@ -494,7 +494,7 @@ class InsertRLSState(str, Enum):
def has_table_query(token_list: TokenList) -> bool:
"""
- Return if a stament has a query reading from a table.
+ Return if a statement has a query reading from a table.
>>> has_table_query(sqlparse.parse("COUNT(*)")[0])
False