mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-16 16:16:43 +10:00
This feature was requested long ago: http://feedback.gitlab.com/forums/176466-general/suggestions/4118466-ability-to-register-only-from-ceratain-domains This MR is based off !253 but changed to use application settings and use wildcard strings to give more flexibility in pattern matching. Regexps seemed overkill and easy to get wrong. Only restrict e-mail addresses upon creation
83 lines
3.9 KiB
Plaintext
83 lines
3.9 KiB
Plaintext
= form_for @application_setting, url: admin_application_settings_path, html: { class: 'form-horizontal fieldset-form' } do |f|
|
|
- if @application_setting.errors.any?
|
|
#error_explanation
|
|
.alert.alert-danger
|
|
- @application_setting.errors.full_messages.each do |msg|
|
|
%p= msg
|
|
|
|
%fieldset
|
|
%legend Features
|
|
.form-group
|
|
.col-sm-offset-2.col-sm-10
|
|
.checkbox
|
|
= f.label :signup_enabled do
|
|
= f.check_box :signup_enabled
|
|
Signup enabled
|
|
.form-group
|
|
.col-sm-offset-2.col-sm-10
|
|
.checkbox
|
|
= f.label :signin_enabled do
|
|
= f.check_box :signin_enabled
|
|
Signin enabled
|
|
.form-group
|
|
.col-sm-offset-2.col-sm-10
|
|
.checkbox
|
|
= f.label :gravatar_enabled do
|
|
= f.check_box :gravatar_enabled
|
|
Gravatar enabled
|
|
.form-group
|
|
.col-sm-offset-2.col-sm-10
|
|
.checkbox
|
|
= f.label :twitter_sharing_enabled do
|
|
= f.check_box :twitter_sharing_enabled, :'aria-describedby' => 'twitter_help_block'
|
|
%strong Twitter enabled
|
|
%span.help-block#twitter_help_block Show users a button to share their newly created public or internal projects on twitter
|
|
%fieldset
|
|
%legend Misc
|
|
.form-group
|
|
= f.label :default_projects_limit, class: 'control-label col-sm-2'
|
|
.col-sm-10
|
|
= f.number_field :default_projects_limit, class: 'form-control'
|
|
.form-group
|
|
= f.label :default_branch_protection, class: 'control-label col-sm-2'
|
|
.col-sm-10
|
|
= f.select :default_branch_protection, options_for_select(Gitlab::Access.protection_options, @application_setting.default_branch_protection), {}, class: 'form-control'
|
|
.form-group.project-visibility-level-holder
|
|
= f.label :default_project_visibility, class: 'control-label col-sm-2'
|
|
.col-sm-10
|
|
= render('shared/visibility_radios', model_method: :default_project_visibility, form: f, selected_level: @application_setting.default_project_visibility, form_model: 'Project')
|
|
.form-group.project-visibility-level-holder
|
|
= f.label :default_snippet_visibility, class: 'control-label col-sm-2'
|
|
.col-sm-10
|
|
= render('shared/visibility_radios', model_method: :default_snippet_visibility, form: f, selected_level: @application_setting.default_snippet_visibility, form_model: 'Snippet')
|
|
.form-group
|
|
= f.label :restricted_visibility_levels, class: 'control-label col-sm-2'
|
|
.col-sm-10
|
|
- data_attrs = { toggle: 'buttons' }
|
|
.btn-group{ data: data_attrs }
|
|
- restricted_level_checkboxes('restricted-visibility-help').each do |level|
|
|
= level
|
|
%span.help-block#restricted-visibility-help Selected levels cannot be used by non-admin users for projects or snippets
|
|
.form-group
|
|
= f.label :home_page_url, class: 'control-label col-sm-2'
|
|
.col-sm-10
|
|
= f.text_field :home_page_url, class: 'form-control', placeholder: 'http://company.example.com', :'aria-describedby' => 'home_help_block'
|
|
%span.help-block#home_help_block We will redirect non-logged in users to this page
|
|
.form-group
|
|
= f.label :sign_in_text, class: 'control-label col-sm-2'
|
|
.col-sm-10
|
|
= f.text_area :sign_in_text, class: 'form-control', rows: 4
|
|
.help-block Markdown enabled
|
|
.form-group
|
|
= f.label :max_attachment_size, 'Maximum attachment size (MB)', class: 'control-label col-sm-2'
|
|
.col-sm-10
|
|
= f.number_field :max_attachment_size, class: 'form-control'
|
|
.form-group
|
|
= f.label :restricted_signup_domains, 'Restricted domains for sign-ups', class: 'control-label col-sm-2'
|
|
.col-sm-10
|
|
= f.text_area :restricted_signup_domains_raw, placeholder: 'domain.com', class: 'form-control'
|
|
.help-block Ex: domain.com, *.domain.com. Wildcards allowed. Use separate lines for multiple entries.
|
|
|
|
.form-actions
|
|
= f.submit 'Save', class: 'btn btn-primary'
|