You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2023/05/30 19:38:14 UTC
[superset] branch tests_for_24249 created (now 0e0e7dac80)
This is an automated email from the ASF dual-hosted git repository.
beto pushed a change to branch tests_for_24249
in repository https://gitbox.apache.org/repos/asf/superset.git
at 0e0e7dac80 chore: tests for #24249
This branch includes the following new commits:
new 0e0e7dac80 chore: tests for #24249
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: chore: tests for #24249
Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
beto pushed a commit to branch tests_for_24249
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 0e0e7dac80686f12e11ad9d4684e419bde644a5f
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Tue May 30 12:38:01 2023 -0700
chore: tests for #24249
---
superset-frontend/src/dashboard/util/permissionUtils.test.ts | 1 -
superset-frontend/src/dashboard/util/permissionUtils.ts | 2 +-
superset-frontend/src/types/Owner.ts | 2 --
3 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/superset-frontend/src/dashboard/util/permissionUtils.test.ts b/superset-frontend/src/dashboard/util/permissionUtils.test.ts
index d19b048769..7ebf0362d2 100644
--- a/superset-frontend/src/dashboard/util/permissionUtils.test.ts
+++ b/superset-frontend/src/dashboard/util/permissionUtils.test.ts
@@ -61,7 +61,6 @@ const owner: Owner = {
first_name: 'Test',
id: ownerUser.userId!,
last_name: 'User',
- username: ownerUser.username,
};
const sqlLabUser: UserWithPermissionsAndRoles = {
diff --git a/superset-frontend/src/dashboard/util/permissionUtils.ts b/superset-frontend/src/dashboard/util/permissionUtils.ts
index 6a218349b2..c07f0bb0f8 100644
--- a/superset-frontend/src/dashboard/util/permissionUtils.ts
+++ b/superset-frontend/src/dashboard/util/permissionUtils.ts
@@ -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,
diff --git a/superset-frontend/src/types/Owner.ts b/superset-frontend/src/types/Owner.ts
index b7548ec629..91e9d29c9b 100644
--- a/superset-frontend/src/types/Owner.ts
+++ b/superset-frontend/src/types/Owner.ts
@@ -25,6 +25,4 @@ export default interface Owner {
first_name: string;
id: number;
last_name: string;
- username: string;
- email?: string;
}