Skip to content

Commit

Permalink
fix: dashboard ownership check (apache#24249)
Browse files Browse the repository at this point in the history
(cherry picked from commit 7e70f19)
  • Loading branch information
betodealmeida authored and jinghua-qa committed May 30, 2023
1 parent d518fa8 commit 78d11a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion superset-frontend/src/dashboard/util/permissionUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 78d11a4

Please sign in to comment.