diff --git a/superset-frontend/src/explore/components/PropertiesModal.tsx b/superset-frontend/src/explore/components/PropertiesModal.tsx index 12e006dce8..eccc6bab73 100644 --- a/superset-frontend/src/explore/components/PropertiesModal.tsx +++ b/superset-frontend/src/explore/components/PropertiesModal.tsx @@ -63,13 +63,17 @@ function PropertiesModal({ slice, onHide, onSave }: InternalProps) { ); const [owners, setOwners] = useState | null>(null); - function showError({ error, statusText }: any) { + function showError({ error, statusText, message }: any) { + let errorText = error || statusText || t('An error has occurred'); + if (message === 'Forbidden') { + errorText = t('You do not have permission to edit this chart'); + } errorDialog.current.show({ title: 'Error', bsSize: 'medium', bsStyle: 'danger', actions: [Dialog.DefaultAction('Ok', () => {}, 'btn-danger')], - body: error || statusText || t('An error has occurred'), + body: errorText, }); }