Skip to content

Commit

Permalink
chore: tests for #24249
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida committed May 30, 2023
1 parent 7e70f19 commit 0e0e7da
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ const owner: Owner = {
first_name: 'Test',
id: ownerUser.userId!,
last_name: 'User',
username: ownerUser.username,
};

const sqlLabUser: UserWithPermissionsAndRoles = {
Expand Down
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 @@ -50,7 +50,7 @@ export const canUserEditDashboard = (
) =>
isUserWithPermissionsAndRoles(user) &&
(isUserAdmin(user) || isUserDashboardOwner(dashboard, user)) &&
findPermission('can_write', 'Dashboard', user.roles);
findPermission('can_write', 'Dashboard', user?.roles);

export function canUserAccessSqlLab(
user?: UserWithPermissionsAndRoles | UndefinedUser,
Expand Down
2 changes: 0 additions & 2 deletions superset-frontend/src/types/Owner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@ export default interface Owner {
first_name: string;
id: number;
last_name: string;
username: string;
email?: string;
}

0 comments on commit 0e0e7da

Please sign in to comment.