diff options
-rw-r--r-- | app/controllers/admin/application_settings_controller.rb | 1 | ||||
-rw-r--r-- | app/models/application_setting.rb | 4 | ||||
-rw-r--r-- | app/views/admin/application_settings/_form.html.haml | 4 | ||||
-rw-r--r-- | db/schema.rb | 1 |
4 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index 6ef7cf0bae6..be483459f70 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -118,6 +118,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController :container_registry_token_expire_delay, :repository_storage, :enabled_git_access_protocol, + :project_size_limit, restricted_visibility_levels: [], import_sources: [], disabled_oauth_sign_in_sources: [] diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 246477ffe88..36d8bfa36ef 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -63,6 +63,10 @@ class ApplicationSetting < ActiveRecord::Base presence: true, numericality: { only_integer: true, greater_than: 0 } + validates :project_size_limit, + presence: true, + numericality: { only_integer: true, greater_than: 0 } + validates :container_registry_token_expire_delay, presence: true, numericality: { only_integer: true, greater_than: 0 } diff --git a/app/views/admin/application_settings/_form.html.haml b/app/views/admin/application_settings/_form.html.haml index d929364fc96..7410e6d883e 100644 --- a/app/views/admin/application_settings/_form.html.haml +++ b/app/views/admin/application_settings/_form.html.haml @@ -89,6 +89,10 @@ .col-sm-10 = f.number_field :max_attachment_size, class: 'form-control' .form-group + = f.label :project_size_limit, 'Project size limit (MB)', class: 'control-label col-sm-2' + .col-sm-10 + = f.number_field :project_size_limit, class: 'form-control' + .form-group = f.label :session_expire_delay, 'Session duration (minutes)', class: 'control-label col-sm-2' .col-sm-10 = f.number_field :session_expire_delay, class: 'form-control' diff --git a/db/schema.rb b/db/schema.rb index 963d528d170..101be92b4f0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -92,6 +92,7 @@ ActiveRecord::Schema.define(version: 20160830232601) do t.text "domain_blacklist" t.boolean "koding_enabled" t.string "koding_url" + t.integer "project_size_limit", default: 0 end create_table "audit_events", force: :cascade do |t| |