Convert Import/Export rate limits to application settings
What does this MR do?
This MR converts previously hard coded rate limits around Project/Group Import/Export and makes them configurable application settings. Hard coded figures were based on what is acceptable for GitLab.com, but might be too restrictive (or too loose) for self-managed installations.
Mentions #219112 (closed)
Migration output
Up:
== 20200701093859 AddImportExportLimitsToApplicationSettings: migrating =======
-- add_column(:application_settings, :project_import_limit, :integer, {:default=>6, :null=>false})
-> 0.0045s
-- add_column(:application_settings, :project_export_limit, :integer, {:default=>6, :null=>false})
-> 0.0011s
-- add_column(:application_settings, :project_download_export_limit, :integer, {:default=>1, :null=>false})
-> 0.0011s
-- add_column(:application_settings, :group_import_limit, :integer, {:default=>6, :null=>false})
-> 0.0011s
-- add_column(:application_settings, :group_export_limit, :integer, {:default=>6, :null=>false})
-> 0.0010s
-- add_column(:application_settings, :group_download_export_limit, :integer, {:default=>1, :null=>false})
-> 0.0010s
== 20200701093859 AddImportExportLimitsToApplicationSettings: migrated (0.0101s)
Down:
== 20200701093859 AddImportExportLimitsToApplicationSettings: reverting =======
-- remove_column(:application_settings, :group_download_export_limit, :integer, {:default=>1, :null=>false})
-> 0.0022s
-- remove_column(:application_settings, :group_export_limit, :integer, {:default=>6, :null=>false})
-> 0.0012s
-- remove_column(:application_settings, :group_import_limit, :integer, {:default=>6, :null=>false})
-> 0.0013s
-- remove_column(:application_settings, :project_download_export_limit, :integer, {:default=>1, :null=>false})
-> 0.0009s
-- remove_column(:application_settings, :project_export_limit, :integer, {:default=>6, :null=>false})
-> 0.0008s
-- remove_column(:application_settings, :project_import_limit, :integer, {:default=>6, :null=>false})
-> 0.0010s
== 20200701093859 AddImportExportLimitsToApplicationSettings: reverted (0.0100s)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines - [-] Merge request performance guidelines
-
Style guides -
Database guides - [-] Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by George Koltsov