Commit Graph

25 Commits

Author SHA1 Message Date
GitLab Bot ba55ca9bc4 Add latest changes from gitlab-org/gitlab@master 2023-05-19 12:07:15 +00:00
GitLab Bot 8d68ae988d Add latest changes from gitlab-org/gitlab@master 2023-01-16 18:10:00 +00:00
GitLab Bot 1bb7f81e23 Add latest changes from gitlab-org/gitlab@master 2022-09-28 15:09:17 +00:00
GitLab Bot eb3a23aaaa Add latest changes from gitlab-org/gitlab@master 2022-09-28 12:07:50 +00:00
GitLab Bot 8b0ef13236 Add latest changes from gitlab-org/gitlab@master 2020-06-03 18:08:28 +00:00
GitLab Bot 79ddf16358 Add latest changes from gitlab-org/gitlab@master 2020-05-08 06:09:40 +00:00
GitLab Bot ae93b28401 Add latest changes from gitlab-org/gitlab@master 2020-04-14 21:09:52 +00:00
GitLab Bot db24ab2b72 Add latest changes from gitlab-org/gitlab@master 2020-01-28 12:08:44 +00:00
GitLab Bot cfc792b9ca Add latest changes from gitlab-org/gitlab@master 2019-12-10 07:53:40 +00:00
GitLab Bot eca3cd3a9e Add latest changes from gitlab-org/gitlab@master 2019-11-15 18:06:24 +00:00
GitLab Bot abfafe3c57 Add latest changes from gitlab-org/gitlab@master 2019-10-29 00:06:10 +00:00
Vladimir Shushlin 6119d5ad75 Don't show private keys for letsencrypt certs
Adds enum certificate_source to pages_domains table
with default manually_uploaded

Mark certificates as 'gitlab_provided'
if the were obtained through Let's Encrypt

Mark certificates as 'user_provided' if they were uploaded through
controller or api

Only show private key in domain edit form if it is 'user_provided'

Only show LetsEncrypt option if is enabled by application settings
(and feature flag)

Refactor and fix some specs to match new logic

Don't show Let's Encrypt certificates as well
2019-06-21 12:06:12 +00:00
gfyoung 93a44e135b Add some frozen string to spec/**/*.rb
Adds frozen string to the following:

* spec/bin/**/*.rb
* spec/config/**/*.rb
* spec/controllers/**/*.rb

xref https://gitlab.com/gitlab-org/gitlab-ce/issues/59758
2019-04-15 10:17:05 +00:00
Vladimir Shushlin 13d2d1985c Fix access to pages domain settings 2019-02-12 12:18:17 +00:00
blackst0ne b44a2c801a Update specs to rails5 format
Updates specs to use new rails5 format.

The old format:
`get :show, { some: params }, { some: headers }`

The new format:
`get :show, params: { some: params }, headers: { some: headers }`
2018-12-19 10:04:31 +11:00
Jasper Maes de399c4a49 Fix deprecation: Comparing equality between ActionController::Parameters and a Hash is deprecated 2018-12-16 13:45:19 +01:00
Mark Chao a63bce1a4b Resolve "Rename the `Master` role to `Maintainer`" Backend 2018-07-11 14:36:08 +00:00
Rob Watson 9d45951fca Add HTTPS-only pages
Closes #28857
2018-03-22 19:58:36 +01:00
Rob Watson f30b47b387 PagesDomain: Add edit/update functionality 2018-02-28 14:41:01 +01:00
Nick Thomas ee68bd9771
Add DNS verification to Pages custom domains 2018-02-23 12:22:29 +00:00
Jacopo 2f40dac352 Refactor `have_http_status` into `have_gitlab_http_status` in the specs 2017-10-20 10:13:18 +02:00
Robert Speicher 72a7b30c9f Change all `:empty_project` to `:project` 2017-08-02 17:47:31 -04:00
Douwe Maan fe13f11041 Create and use project path helpers that only need a project, no namespace 2017-07-05 11:11:59 -05:00
Mark Fletcher 3ce95e7c16 Disable navigation to Pages config if Pages is disabled
* Regards project-level pages config
- Nav link is now shown only if Pages is enabled for instance
- Navigation to following controllers denied if Pages disabled:
  * projects/pages_controller
  * projects/pages_domains_controller
- 'disabled' partial removed
+ Test for pages_controller introduced
2017-05-04 14:11:40 +08:00
Timothy Andrew 86f4767dc1 Fix 500 error while navigating to the `pages_domains` 'show' page.
==================
= Implementation =
==================

1. The path of the page is of the form 'group/project/pages/domains/<domain_name>'
2. Rails looks at `params[:id]` (which should be the domain name), and finds the
   relevant model record.
3. Given a domain like `foo.bar`, Rails sets `params[:id]` to `foo` (should be
   `foo.bar`), and sets `params[:format]` to `bar`
4. This commit fixes the issue by adding a route constraint, so that
   `params[:id]` is set to the entire `foo.bar` domain name.

=========
= Tests =
=========

1. Add controller specs for the `PagesDomainController`. These are
   slightly orthogonal to this bug fix (they don't fail when this bug is
   present), but should be present nonetheless.
2. Add routing specs that catch this bug (by asserting that the `id`
   param is passed as expected when it contains a domain name).
3. Modify the 'RESTful project resources' routing spec shared example to
   accomodate controllers where the controller path (such as
   `pages/domains`) is different from the controller name (such as
   `pages_domains`).
2017-01-31 22:55:33 +00:00