You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by el...@apache.org on 2023/07/20 00:17:44 UTC
[superset] 01/04: fix: dashboard ownership check (#24249)
This is an automated email from the ASF dual-hosted git repository.
elizabeth pushed a commit to branch 2.1
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 472ef7ba7fb4a47bd1c9e73247f1d8e82d39b079
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Tue May 30 12:18:20 2023 -0700
fix: dashboard ownership check (#24249)
(cherry picked from commit 7e70f19b6829eb7226cb53da9eeb1aff83b18dbe)
---
superset-frontend/src/dashboard/util/permissionUtils.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset-frontend/src/dashboard/util/permissionUtils.ts b/superset-frontend/src/dashboard/util/permissionUtils.ts
index 3ea63976bf..6a218349b2 100644
--- a/superset-frontend/src/dashboard/util/permissionUtils.ts
+++ b/superset-frontend/src/dashboard/util/permissionUtils.ts
@@ -42,7 +42,7 @@ const isUserDashboardOwner = (
user: UserWithPermissionsAndRoles | UndefinedUser,
) =>
isUserWithPermissionsAndRoles(user) &&
- dashboard.owners.some(owner => owner.username === user.username);
+ dashboard.owners.some(owner => owner.id === user.userId);
export const canUserEditDashboard = (
dashboard: Dashboard,