ddxv commented on issue #17049: URL: https://github.com/apache/superset/issues/17049#issuecomment-1947695484
OK, a bit more reading of the stack trace and we get to here: https://github.com/apache/superset/blob/3.1.0/superset/commands/dataset/importers/v1/utils.py ```py def import_dataset( session: Session, config: dict[str, Any], overwrite: bool = False, force_data: bool = False, ignore_permissions: bool = False, ) -> SqlaTable: can_write = ignore_permissions or security_manager.can_access( "can_write", "Dataset", ) ``` `security_manager` is the one who tries `g.user` which fails. I've seen @betodealmeida might know more about this, is the check for security_manager needed here for import_dataset? I see other functions in the `cli/importexport.py` use the `g.user = security_manager.find_user(username="admin")` which might need to be set earlier in the `import_datasources`, do you think that is appropriate? -- 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]
