You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by su...@apache.org on 2021/07/08 18:18:46 UTC
[superset] branch fix/null-user-id created (now ea3c004)
This is an automated email from the ASF dual-hosted git repository.
suddjian pushed a change to branch fix/null-user-id
in repository https://gitbox.apache.org/repos/asf/superset.git.
at ea3c004 fix(dashboard): user id can be null when there is an anonymous user
This branch includes the following new commits:
new ea3c004 fix(dashboard): user id can be null when there is an anonymous user
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[superset] 01/01: fix(dashboard): user id can be null when there is
an anonymous user
Posted by su...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
suddjian pushed a commit to branch fix/null-user-id
in repository https://gitbox.apache.org/repos/asf/superset.git
commit ea3c004446eb451cb6b7946ed2fe9ea76df779d9
Author: David Aaron Suddjian <aa...@gmail.com>
AuthorDate: Thu Jul 8 11:17:49 2021 -0700
fix(dashboard): user id can be null when there is an anonymous user
---
superset-frontend/src/dashboard/actions/hydrate.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset-frontend/src/dashboard/actions/hydrate.js b/superset-frontend/src/dashboard/actions/hydrate.js
index 21b2ffa..840a4af 100644
--- a/superset-frontend/src/dashboard/actions/hydrate.js
+++ b/superset-frontend/src/dashboard/actions/hydrate.js
@@ -336,7 +336,7 @@ export const hydrateDashboard = (dashboardData, chartData, datasourcesData) => (
dashboardInfo: {
...dashboardData,
metadata,
- userId: String(user.userId), // legacy, please use state.user instead
+ userId: user.userId ? String(user.userId) : null, // legacy, please use state.user instead
dash_edit_perm: canEdit,
dash_save_perm: findPermission('can_save_dash', 'Superset', roles),
dash_share_perm: findPermission(