Commit Graph

214 Commits

Author SHA1 Message Date
GitLab Bot 73b1049a46 Add latest changes from gitlab-org/gitlab@master 2020-12-31 15:10:32 +00:00
GitLab Bot 3683fb837c Add latest changes from gitlab-org/gitlab@master 2020-11-17 03:09:06 +00:00
GitLab Bot a08f8baa63 Add latest changes from gitlab-org/gitlab@master 2020-11-10 12:08:57 +00:00
GitLab Bot 4bc1e04a7a Add latest changes from gitlab-org/gitlab@master 2020-10-29 06:08:45 +00:00
GitLab Bot 3ef453aa1c Add latest changes from gitlab-org/gitlab@master 2020-10-05 21:08:47 +00:00
GitLab Bot 27852d1997 Add latest changes from gitlab-org/gitlab@master 2020-09-25 21:09:51 +00:00
GitLab Bot a8b87b4fe0 Add latest changes from gitlab-org/gitlab@master 2020-09-18 09:09:32 +00:00
GitLab Bot ff579119e2 Add latest changes from gitlab-org/gitlab@master 2020-08-26 12:10:53 +00:00
GitLab Bot 2b349d9a94 Add latest changes from gitlab-org/gitlab@master 2020-08-25 18:10:49 +00:00
GitLab Bot c64b892786 Add latest changes from gitlab-org/gitlab@master 2020-08-17 06:10:12 +00:00
GitLab Bot 2ecc6e22e3 Add latest changes from gitlab-org/gitlab@master 2020-08-04 18:09:49 +00:00
GitLab Bot fe25c98fa8 Add latest changes from gitlab-org/gitlab@master 2020-07-01 21:08:51 +00:00
GitLab Bot 018431c70e Add latest changes from gitlab-org/gitlab@master 2020-06-11 15:08:36 +00:00
GitLab Bot 47579e24f3 Add latest changes from gitlab-org/gitlab@master 2020-05-27 21:08:05 +00:00
GitLab Bot 3174adc799 Add latest changes from gitlab-org/gitlab@master 2020-05-26 00:08:21 +00:00
GitLab Bot 5f0e3773e9 Add latest changes from gitlab-org/gitlab@master 2020-05-06 21:10:00 +00:00
GitLab Bot 028bb5dda7 Add latest changes from gitlab-org/gitlab@master 2020-04-30 18:09:38 +00:00
GitLab Bot 874ead9c3a Add latest changes from gitlab-org/gitlab@master 2020-04-14 15:09:44 +00:00
GitLab Bot 495c22d124 Add latest changes from gitlab-org/gitlab@master 2020-04-06 18:09:37 +00:00
GitLab Bot f6e2f30241 Add latest changes from gitlab-org/gitlab@master 2020-03-31 00:08:09 +00:00
GitLab Bot e20baee820 Add latest changes from gitlab-org/gitlab@master 2020-03-27 18:07:48 +00:00
GitLab Bot 120f4aaedc Add latest changes from gitlab-org/gitlab@master 2020-03-24 15:08:44 +00:00
GitLab Bot b375c6c05f Add latest changes from gitlab-org/gitlab@master 2020-03-02 15:08:01 +00:00
GitLab Bot 866ca4e49f Add latest changes from gitlab-org/gitlab@master 2020-02-14 21:09:08 +00:00
GitLab Bot b3a736ed88 Add latest changes from gitlab-org/gitlab@master 2020-02-14 15:09:08 +00:00
GitLab Bot 7351a484d7 Add latest changes from gitlab-org/gitlab@master 2020-02-10 12:08:59 +00:00
GitLab Bot 7cc6872401 Add latest changes from gitlab-org/gitlab@master 2020-01-29 12:09:08 +00:00
GitLab Bot fedf978f9a Add latest changes from gitlab-org/gitlab@master 2020-01-28 15:08:36 +00:00
GitLab Bot a5ab3467a7 Add latest changes from gitlab-org/gitlab@master 2020-01-13 15:07:53 +00:00
GitLab Bot a821bd6ad1 Add latest changes from gitlab-org/gitlab@master 2020-01-08 09:07:53 +00:00
Justin Ho Tuan Duong 78f85399ac Hide AWS secret on Admin Integration page 2019-11-26 17:02:31 +00:00
GitLab Bot 8c8b94e711 Add latest changes from gitlab-org/gitlab@master 2019-10-07 21:07:54 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
GitLab Bot 274ea604fc Add latest changes from gitlab-org/gitlab@master 2019-09-16 21:06:30 +00:00
GitLab Bot b7dfe2ae40 Add latest changes from gitlab-org/gitlab@master 2019-09-13 13:26:31 +00:00
Mathieu Parent 85776fa3ff Settings API: domain_{black,white}list should be arrays
As in documentation.

Fixes: #58180.

Also remove the requirement between domain_blacklist_enabled and domain_blacklist.
2019-09-09 15:14:52 +02:00
Mathieu Parent ea14d17da4 Show domain_blacklist and domain_whitelist in the settings API 2019-09-09 15:11:34 +02:00
Mayra Cabrera 3cefc5d7df Add RateLimiter to RawController
* Limits raw requests to 300 per minute and per raw path.
* Add a new attribute to ApplicationSettings so user can change this
value on their instance.
* Uses Gitlab::ActionRateLimiter to limit the raw requests.
* Add a new method into ActionRateLimiter to log the event into auth.log

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/48717
2019-07-24 19:49:31 +00:00
Vladimir Shushlin 7b5936ebda Remove auto ssl feature flags
* remove feature flag for admin settings
* remove feature flag for domain settings
2019-07-12 16:53:44 +00:00
Stan Hu 045ab84e0b Fix broken specs due to cached application settings
The /admin panel will now always return an uncached
application setting to ensure it always has the most
current info.
2019-07-01 22:23:01 -07:00
Brett Walker 6b4f93c034 Update application settings using correct action
Updating multiple application settings panels through
a single action causes the incorrect action to be shown
when there are errors.  Instead, make each panel action
handle both updating and display.
2019-06-19 12:29:10 -05:00
Peter Leitzen 792a998bd4 Whitelist query limiting admin usage data endpoint 2019-06-12 15:59:16 +00:00
Vladimir Shushlin 3c33724e2e Add Let's Encrypt client
Part of adding Let's Encrypt certificates for pages domains

Add acme-client gem

Client is being initialized by private key stored in secrets.yml
Let's Encrypt account is being created lazily.
If it's already created, Acme::Client just gets account_kid by
calling new_account method

Make Let's Encrypt client an instance
Wrap order and challenge classes
2019-05-16 09:32:25 +00:00
Vladimir Shushlin db6989ddb0 Add Let's Encrypt application settings
Store Let's Encrypt account email in application settings
Also add explicit terms of service consent
2019-04-27 04:38:01 +00:00
Imre Farkas 9bc5ed14fe Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE 2019-04-09 15:38:58 +00:00
Andreas Brandl 46b1b9c1d6 Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"
This reverts merge request !26823
2019-04-05 13:02:56 +00:00
Imre Farkas d9d7237d2e Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE 2019-04-05 11:45:47 +00:00
Martin Wortschack 8ce09a1d42 Externalize strings in admin controllers
- Update PO file
2019-03-21 14:31:34 +01:00
Jasper Maes fbdb463580 Fix deprecation: redirect_to :back is deprecated 2019-01-02 19:48:07 +01:00
Mark Chao 39ae9a59a5 Make Highlight accept language param
This replaces the repository param.
This allows more flexiblity as sometimes we have highlight content
not related to repository. Sometimes we know ahead of time the language
of the content. Lastly language determination seems better fit as a
logic in the Blob class.
`repository` param is only used to determine the language, which seems
to be the responsiblity of Blob.
2018-10-30 15:44:55 +08:00
Tomasz Maczukin 42af229510
Simplify runner registration token resetting
This icommit adds several changes related to the same topic
- resetting a Runner registration token:

1. On Project settings page it adds a button for resetting the
   registration token and it removes the Runner token field
   that was confusing all GitLab users.

2. On Group settings page it adds the same button for resetting
   the registration token.

3. On Admin Runners settings page it moves the button to the same
   place as in Project and Group settings and it changes slightly
   the page layout to make it more similar to Group and Project
   setting pages.

4. It refactorizes a little the partial that prints runner
   registration description. Thanks to this Project, Group
   and Admin settings of the Runner are re-using the same
   code to generate the button.

5. Updates the translations of changed text.
2018-10-04 08:37:01 +02:00
Valery Sizov 2daa8d387b Remove background job throttling feature
We remove this feature as it never worked properly
2018-09-24 18:41:14 +03:00
Stan Hu 711e9f0796 Merge branch 'frozen-string-app-controller' into 'master'
Enable frozen string in app/controllers/**/*.rb

See merge request gitlab-org/gitlab-ce!21736
2018-09-20 22:53:27 +00:00
Martin Wortschack df9cb93091 Add empty controller actions and utilize referer_path helper 2018-09-19 12:57:14 +02:00
gfyoung 73322a0e55 Enable frozen string in app/controllers/**/*.rb
Enables frozen string for the following:

* app/controllers/*.rb
* app/controllers/admin/**/*.rb
* app/controllers/boards/**/*.rb
* app/controllers/ci/**/*.rb
* app/controllers/concerns/**/*.rb

Partially addresses #47424.
2018-09-18 21:22:45 -07:00
Martin Wortschack a7071deddc Parse request.referer properly 2018-09-18 10:47:05 +02:00
Martin Wortschack 378242d760 Adds empty methods for 'geo' and 'templates' 2018-09-14 14:37:05 +02:00
Martin Wortschack a2f7936c74 merge master and resolve conflicts 2018-09-11 08:43:10 +02:00
Martin Wortschack bfd2181310 use referer for redirect instead of hidden field param from partials 2018-09-10 19:45:33 +02:00
Jan Provaznik a415a904b8 Ask user explicitly about usage stats agreement 2018-09-07 14:32:28 +00:00
Martin Wortschack 276e78e058 handle redirect properly 2018-09-06 15:44:15 +02:00
Martin Wortschack be41338b66 redirect to the relevant sub page after updating application settings 2018-09-05 11:22:18 +02:00
Andrei Vukolov 6d2b934d44 Fix initial settings loading at the first run of GitLab installed from source 2018-06-25 17:44:03 +00:00
Andrei Vukolov 1d116f3ecd Update wrong initial setting transfer in application_settings_controller.rb 2018-06-21 10:08:59 +00:00
Rémy Coutable a46929ea2f
Use ApplicationSetting.current_without_cache instead of ApplicationSetting.current where applicable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-05-23 16:14:43 +02:00
Dmitriy Zaporozhets 6106cad955
Don't reset application settings oauth providers by mistake
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-04-13 18:54:08 +03:00
Dmitriy Zaporozhets bcf7a7e76c
Don't reset application settings import sources
If form does not have import sources checkboxes we should not reset
import sources to empty. This fixes issue when import sources got reset
after user modifies unrelated settings section like GitLab pages

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-04-13 14:52:54 +03:00
blackst0ne ac1b5def53 [Rails5] Fix admin/application_settings_controller
The `RAILS5=1 rspec spec/controllers/admin/application_settings_controller_spec.rb`
command throws the error:

Failures:

  1) Admin::ApplicationSettingsController PUT #update falls back to defaults when settings are omitted
      Failure/Error: import_sources = params[:application_setting][:import_sources]

      NoMethodError:
        undefined method `[]' for nil:NilClass
      # ./app/controllers/admin/application_settings_controller.rb:62:in `application_setting_params'

This commit fixes it.
2018-04-11 12:33:11 +11:00
Robert Speicher c7a77dced7 Remove the `pretty` parameter for `usage_data` 2017-09-06 14:25:09 -04:00
Bob Van Landuyt ea1012ccb4 Make the attribute list for application settings reusable 2017-07-27 11:49:27 +02:00
Nick Thomas e4391c7190 Backport changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2328 2017-07-21 18:45:12 +01:00
Robin Bobbitt 672a68d372 Fixes needed when GitLab sign-in is not enabled
When sign-in is disabled:
 - skip password expiration checks
 - prevent password reset requests
 - don’t show Password tab in User Settings
 - don’t allow login with username/password for Git over HTTP requests
 - render 404 on requests to Profiles::PasswordsController
2017-07-13 10:08:27 -04:00
Rémy Coutable 040eeb1039
Allow to enable the Performance Bar for a group from the admin area
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-06 18:57:02 +02:00
Tiago Botelho 197a5df42a Allow admin to disable all restricted visibility levels 2017-07-05 19:20:52 +01:00
Robin Bobbitt e09ddc62b3 Help landing page customizations 2017-06-14 11:40:21 -04:00
Pawel Chojnacki c28546177e Prometheus settings 2017-06-02 19:45:57 +02:00
Luke "Jared" Bennett 284d4f76fe
Attempted adding separate clientside_sentry settings 2017-04-28 13:41:29 +01:00
Sean McGivern 81022d7667 Add user cohorts table to admin area
This table shows the percentage of users who registered in the last
twelve months, who last signed in during or later than each of those
twelve months, by month.

It is only enabled when the usage ping is enabled, and the page also
shows pretty-printed usage ping data.

The cohorts table is generated in Ruby from some basic SQL queries,
because performing the gap-filling and running sums needed in both MySQL
and Postgres is painful.
2017-04-14 15:20:55 +02:00
Sean McGivern 0483019e98 Port 'Add more usage data to EE ping' to CE
CE port of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/735
2017-04-14 15:20:55 +02:00
Sean McGivern ebd5e9b454 Port 'Add EE usage ping' to CE
CE port of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/557
2017-04-14 15:20:55 +02:00
Adam Niedzielski 9543025e88 Introduce "polling_interval_multiplier" as application setting
Implement module for setting "Poll-Interval" response header.
Return 429 in ETag caching middleware when polling is disabled.
2017-04-03 15:17:04 +02:00
Toon Claes 5058fc67ac Remove redundant code to convert restricted_levels to integers
The ApplicationSetting#restricted_visibility_levels= now takes care of
converting string formatted levels to integers.
2017-03-23 15:25:42 +01:00
Pawel Chojnacki 80fbced2e0 Add admin settings entries 2017-03-06 15:41:25 +01:00
Lin Jen-Shin 53c94f9ea2 Use the same syntax for default expiration
Feedback:

* https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_23343951
* https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_23344036
* https://gitlab.com/gitlab-org/gitlab-ce/issues/27762#note_23344797
2017-02-15 15:31:51 +08:00
Lin Jen-Shin d2d30cff55 Initial implementation for default artifacts expiration
TODO: Add tests and screenshots
2017-02-15 15:31:51 +08:00
James Edwards-Jones b988faaf85 Merge branch 'master' into 'jej-pages-to-ce'
# Conflicts:
#   db/schema.rb
2017-02-06 15:12:27 +00:00
Adam Niedzielski 5d3816652e Introduce maximum session time for terminal websocket connection
Store the value in application settings.
Expose the value to Workhorse.
2017-02-06 11:49:30 +01:00
Kamil Trzcinski 120f9abaa1 Add GitLab Pages
- The pages are created when build artifacts for `pages` job are uploaded
- Pages serve the content under: http://group.pages.domain.com/project
- Pages can be used to serve the group page, special project named as host: group.pages.domain.com
- User can provide own 403 and 404 error pages by creating 403.html and 404.html in group page project
- Pages can be explicitly removed from the project by clicking Remove Pages in Project Settings
- The size of pages is limited by Application Setting: max pages size, which limits the maximum size of unpacked archive (default: 100MB)
- The public/ is extracted from artifacts and content is served as static pages
- Pages asynchronous worker use `dd` to limit the unpacked tar size
- Pages needs to be explicitly enabled and domain needs to be specified in gitlab.yml
- Pages are part of backups
- Pages notify the deployment status using Commit Status API
- Pages use a new sidekiq queue: pages
- Pages use a separate nginx config which needs to be explicitly added
2017-01-31 22:50:39 +00:00
Oswaldo Ferreira ae057666bf EE backport for new application settings service 2017-01-23 16:22:33 -02:00
Horacio Sanson f986b4c4e5 Add support for PlantUML diagrams in Asciidoc.
This MR enables rendering of PlantUML diagrams in Asciidoc documents. To add a
PlantUML diagram all we need is to include a plantuml block like:

```
[plantuml, id="myDiagram", width="100px", height="100px"]
--
bob -> alice : ping
alice -> bob : pong
--
```

The plantuml block is substituted by an HTML img element with *src* pointing to
an external PlantUML server.

This MR also add a PlantUML integration section to the Administrator -> Settings
page to configure the PlantUML rendering service and to enable/disable it.

Closes: #17603
2017-01-12 10:04:52 +00:00
Rémy Coutable d8d9d0c74c Refactor authorized params in Admin::UsersController
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-11 16:52:30 -05:00
Rémy Coutable dafd5531ed Refactor authorized params in Admin::ApplicationSettingsController
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-11 16:52:30 -05:00
Ruben Davila b62e2bedbf Add new configuration setting to enable/disable HTML emails.
This new global setting will allow admins to specify if HTML emails should be sent or not,
this is basically useful when system administrators want to save some disk space by avoiding
emails in HTML format and using only the Plain Text version.
2016-11-28 17:00:03 -05:00
Patricio Cano b95216aaba Allow the Sidekiq queues to throttle and the factor by which to throttle them to be configurable 2016-11-10 11:38:11 -06:00
Patricio Cano 9e2964c15a Allow certain Sidekiq jobs to be throttled 2016-11-10 11:38:10 -06:00
Jacob Vosmaer 6bcc52a536 Refine Git garbage collection 2016-11-04 14:30:11 +01:00
Nick Thomas c1388d0efb Allow multiple repository storage shards to be enabled, and automatically round-robin between them 2016-11-04 04:01:08 +00:00
Gokmen Goksel a927a9bf6b Support integration with Koding (online IDE)
Koding: #index: landing page for Koding integration

If enabled it will provide a link to open remote Koding instance url
for now we are also providing the sneak preview video for how
integration works in detail.

Repository: check whether .koding.yml file exists on repository

Projects: landing page: show Run in IDE (Koding) button if repo has stack file

Projects: MR: show Run in IDE Koding button if repo has stack file on active branch

ProjectHelpers: add_koding_stack: stack generator for provided project

With this helper we will auto-generate the required stack template
for a given project. For the feature we can request this base template
from the running Koding instance on integration.

Currently this will provide users to create a t2.nano instance on aws
and it'll automatically configures the instance for basic requirements.

Projects: empty state and landing page provide shortcuts to create stack

projects_helper: use branch on checkout and provide an entry point

This ${var.koding_queryString_branch} will be replaced with the branch
provided in query string which will allow us to use same stack template
for different branches of the same repository.

ref: b8c0e43c4c

projects_helper: provide sha info in query string to use existing vms

With this change we'll be able to query existing vms on Koding side
based on the commit id that they've created.

ref: 1d630fadf3

Integration: Docs: Koding documentation added

Disable /koding route if integration is disabled

Use application settings to enable Koding

Projects_helper: better indentation with strip_heredoc usage

Projects_helper: return koding_url as is if there is no project provided

current_settings: set koding_enabled: false by default

Koding_Controller: to render not_found once integration is disabled

Dashboard_specs: update spec for Koding enabled case

Projects_Helper: make repo dynamic

ref: 4d615242f4

Updated documentation to have right format
2016-08-19 12:10:58 -07:00
Patricio Cano 1a057d2b40 Reorder allowed params for `ApplicationSetting` and add more details to docs. 2016-07-19 17:08:40 -05:00
Patricio Cano c71e658cca Refactor and rename `restricted_signup_domains` to `domain_whitelist` to better conform to its behavior and newly introduced behavior. 2016-07-18 17:53:43 -05:00