mirror of
https://github.com/apache/superset.git
synced 2024-09-06 22:07:34 -04:00
fix: change Alert Permissions (#16118)
* added google alert * reworked permissions
This commit is contained in:
parent
5ce38839e7
commit
606a7bf429
@ -417,7 +417,7 @@ class Header extends React.PureComponent {
|
||||
const roles = Object.keys(user.roles || []);
|
||||
const permissions = roles.map(key =>
|
||||
user.roles[key].filter(
|
||||
perms => perms[0] === 'can_add' && perms[1] === 'AlertModelView',
|
||||
perms => perms[0] === 'menu_access' && perms[1] === 'Manage',
|
||||
),
|
||||
);
|
||||
return permissions[0].length > 0;
|
||||
|
@ -200,7 +200,7 @@ export class ExploreChartHeader extends React.PureComponent {
|
||||
const roles = Object.keys(user.roles || []);
|
||||
const permissions = roles.map(key =>
|
||||
user.roles[key].filter(
|
||||
perms => perms[0] === 'can_add' && perms[1] === 'AlertModelView',
|
||||
perms => perms[0] === 'menu_access' && perms[1] === 'Manage',
|
||||
),
|
||||
);
|
||||
return permissions[0].length > 0;
|
||||
|
Loading…
Reference in New Issue
Block a user