diff options
author | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-08-25 15:58:59 +0300 |
---|---|---|
committer | tiagonbotelho <tiagonbotelho@hotmail.com> | 2016-08-31 21:02:02 +0300 |
commit | cf852ecf870cabdb98527fee1c4d16767eee07ba (patch) | |
tree | 87f67f24340ee8d89c43ee5f168633d997480d7b /app | |
parent | 4d042afeced540c0acd887714d8ec7c962b7c507 (diff) |
adds migration and respective validation and update of limit of memory per project
Diffstat (limited to 'app')
-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 |
3 files changed, 9 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' |