msyavuz commented on code in PR #40331:
URL: https://github.com/apache/superset/pull/40331#discussion_r3289255898
##########
superset/utils/core.py:
##########
@@ -2069,13 +2073,25 @@ def apply_max_row_limit(
>>> apply_max_row_limit(0) # Zero returns default max limit
50000
"""
+ # Imported locally to avoid a circular import: superset.extensions pulls in
+ # superset.security.manager / superset.utils.cache_manager, both of which
+ # import superset.utils.core.
# pylint: disable=import-outside-toplevel
-
- max_limit = (
- app.config["TABLE_VIZ_MAX_ROW_SERVER"]
- if server_pagination
- else app.config["SQL_MAX_ROW"]
+ from superset.extensions import feature_flag_manager
+
+ # A "full" CSV/Excel export is allowed past the regular SQL_MAX_ROW cap,
but
+ # only when the operator has opted in via the ALLOW_FULL_CSV_EXPORT flag.
+ # server_pagination is a separate, independent reason to raise the cap and
is
+ # NOT gated by that flag.
+ allow_full_export = full_export and
feature_flag_manager.is_feature_enabled(
+ "ALLOW_FULL_CSV_EXPORT"
Review Comment:
So can this check go one level above?
--
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]