villebro commented on code in PR #21765:
URL: https://github.com/apache/superset/pull/21765#discussion_r994455757
##########
superset/reports/commands/execute.py:
##########
@@ -675,12 +673,13 @@ def __init__(self, task_id: str, model_id: int,
scheduled_dttm: datetime):
def run(self) -> None:
with session_scope(nullpool=True) as session:
try:
- self.validate(session=session)
- if not self._model:
- raise ReportScheduleExecuteUnexpectedError()
- ReportScheduleStateMachine(
- session, self._execution_id, self._model,
self._scheduled_dttm
- ).run()
+ with override_user(_get_user()):
Review Comment:
The new `BaseFilter` checks `sm.is_admin()`, which in turn checks the roles
of `g.user`, which otherwise will be unset. So without this change executing
Alerts and Reports fails (the integration tests thankfully picked this up 👍 )
--
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]