mirror of
https://github.com/apache/superset.git
synced 2026-05-11 10:55:43 +00:00
fix: enable admin to edit dataset in explore (#20613)
* add conditional * add test * fix lint
This commit is contained in:
committed by
GitHub
parent
0ce0c6e1eb
commit
e1a918f141
@@ -236,10 +236,9 @@ class DatasourceControl extends React.PureComponent {
|
||||
|
||||
const isSqlSupported = datasource.type === 'table';
|
||||
const { user } = this.props;
|
||||
const allowEdit = datasource.owners
|
||||
?.map(o => o.id || o.value)
|
||||
.includes(user.userId);
|
||||
isUserAdmin(user);
|
||||
const allowEdit =
|
||||
datasource.owners?.map(o => o.id || o.value).includes(user.userId) ||
|
||||
isUserAdmin(user);
|
||||
|
||||
const editText = t('Edit dataset');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user