summaryrefslogtreecommitdiff
path: root/lib/api/settings.rb
diff options
context:
space:
mode:
authorAdam Niedzielski <adamsunday@gmail.com>2017-01-26 19:16:50 +0100
committerAdam Niedzielski <adamsunday@gmail.com>2017-02-06 11:49:30 +0100
commit5d3816652e13cde6bf5e9de814d2c9d1e6593601 (patch)
treef6137cb0baeb01330a1729d00c059988ced600ee /lib/api/settings.rb
parent572fb0be9b1d45437b7c0ed1000399657f471ec7 (diff)
downloadgitlab-ce-5d3816652e13cde6bf5e9de814d2c9d1e6593601.tar.gz
Introduce maximum session time for terminal websocket connectionterminal-max-session-time
Store the value in application settings. Expose the value to Workhorse.
Diffstat (limited to 'lib/api/settings.rb')
-rw-r--r--lib/api/settings.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/api/settings.rb b/lib/api/settings.rb
index c5eff16a5de..a1d1c1432d3 100644
--- a/lib/api/settings.rb
+++ b/lib/api/settings.rb
@@ -107,6 +107,7 @@ module API
requires :housekeeping_full_repack_period, type: Integer, desc: "Number of Git pushes after which a full 'git repack' is run."
requires :housekeeping_gc_period, type: Integer, desc: "Number of Git pushes after which 'git gc' is run."
end
+ optional :terminal_max_session_time, type: Integer, desc: 'Maximum time for web terminal websocket connection (in seconds). Set to 0 for unlimited time.'
at_least_one_of :default_branch_protection, :default_project_visibility, :default_snippet_visibility,
:default_group_visibility, :restricted_visibility_levels, :import_sources,
:enabled_git_access_protocol, :gravatar_enabled, :default_projects_limit,
@@ -120,7 +121,7 @@ module API
:akismet_enabled, :admin_notification_email, :sentry_enabled,
:repository_storage, :repository_checks_enabled, :koding_enabled, :plantuml_enabled,
:version_check_enabled, :email_author_in_body, :html_emails_enabled,
- :housekeeping_enabled
+ :housekeeping_enabled, :terminal_max_session_time
end
put "application/settings" do
if current_settings.update_attributes(declared_params(include_missing: false))