bito-code-review[bot] commented on PR #44494:
URL: https://github.com/apache/superset/pull/44494#issuecomment-5767320748
<!-- Bito Reply -->
The concern regarding the accuracy of the editorship check is noted. The
current implementation in `superset/commands/chart/update.py` enforces
`security_manager.raise_for_editorship(self._model)` for both regular updates
and query-context-only updates. If `ExecutorType.EDITOR` logic relies on the
`ReportSchedule` rather than the chart, and if a user with only view access is
permitted to create a report, then enforcing chart editorship for query-context
updates may indeed be overly restrictive or misaligned with the intended
executor behavior.
**superset/commands/chart/update.py**
```
if not is_query_context_update(self._properties):
try:
security_manager.raise_for_editorship(self._model)
except SupersetSecurityException as ex:
raise ChartForbiddenError() from ex
raise_if_managed_externally(self._model, ChartForbiddenError)
else:
try:
security_manager.raise_for_editorship(self._model)
except SupersetSecurityException as ex:
raise ChartForbiddenError() from ex
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]