Skip to content

Commit

Permalink
fix(report): Fix permission check for set up email report on charts/d…
Browse files Browse the repository at this point in the history
…ashboards. Fixes apache#21559 (apache#21561)

Co-authored-by: Rui Zhao <zhaorui@dropbox.com>
(cherry picked from commit 7f971b4)
  • Loading branch information
zhaorui2022 authored and DmitriiNS committed Jul 10, 2023
1 parent 48ec27d commit 3eca285
Showing 1 changed file with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,39 @@ const stateWithNonMenuAccessOnManage = {
reports: {},
};

const stateWithNonAdminUser = {
user: {
email: 'nonadmin@test.com',
firstName: 'nonadmin',
isActive: true,
lastName: 'nonadmin',
permissions: {},
createdOn: '2022-01-12T10:17:37.801361',
roles: {
Gamme: [['no_menu_access', 'Manage']],
OtherRole: [['menu_access', 'Manage']],
},
userId: 1,
username: 'nonadmin',
},
reports: {},
};

const stateWithNonMenuAccessOnManage = {
user: {
email: 'nonaccess@test.com',
firstName: 'nonaccess',
isActive: true,
lastName: 'nonaccess',
permissions: {},
createdOn: '2022-01-12T10:17:37.801361',
roles: { Gamma: [['no_menu_access', 'Manage']] },
userId: 1,
username: 'nonaccess',
},
reports: {},
};

const stateWithUserAndReport = {
user: {
email: 'admin@test.com',
Expand Down

0 comments on commit 3eca285

Please sign in to comment.