Commit Graph

1869 Commits

Author SHA1 Message Date
Kamil Trzciński d840535c33 Merge branch '33697-pipelines-json-endpoint' into 'master'
Resolve "CI retry/cancel job or pipeline redirect the user and can't be open in a new tab"

Closes #33697

See merge request gitlab-org/gitlab-ce!18451
2018-05-07 08:32:45 +00:00
Bob Van Landuyt 39916fdfed Reuses `InternalRedirect` when possible
`InternalRedirect` prevents Open redirect issues by only allowing
redirection to paths on the same host.

It cleans up any unwanted strings from the path that could point to
another host (fe. //about.gitlab.com/hello). While preserving the
querystring and fragment of the uri.

It is already used by:

- `TermsController`
- `ContinueParams`
  - `ImportsController`
  - `ForksController`
- `SessionsController`: Only for verifying the host in CE. EE allows
   redirecting to a different instance using Geo.
2018-05-04 13:54:43 +02:00
Bob Van Landuyt 7684217d68 Enforces terms in the web application
This enforces the terms in the web application. These cases are
specced:

- Logging in: When terms are enforced, and a user logs in that has not
  accepted the terms, they are presented with the screen. They get
  directed to their customized root path afterwards.
- Signing up: After signing up, the first screen the user is presented
  with the screen to accept the terms. After they accept they are
  directed to the dashboard.
- While a session is active:
  - For a GET: The user will be directed to the terms page first,
    after they accept the terms, they will be directed to the page
    they were going to
  - For any other request: They are directed to the terms, after they
    accept the terms, they are directed back to the page they came
    from to retry the request. Any information entered would be
    persisted in localstorage and available on the page.
2018-05-04 13:54:43 +02:00
Bob Van Landuyt 10aa55a770 Allow a user to accept/decline terms
When a user accepts, we store this in the agreements to keep track of
which terms they accepted. We also update the flag on the user.
2018-05-04 13:54:43 +02:00
Bob Van Landuyt 3629dc338f Display terms to a user
When terms are present, they can be viewed on `/-/users/terms`.
2018-05-04 13:52:55 +02:00
Dylan Griffith d39b3d4b8d Merge branch 'master' into feature/runner-per-group 2018-05-03 09:54:12 +02:00
Winnie Hellmann 244f511eec Load branches on new merge request page asynchronously 2018-05-02 22:23:48 +00:00
Matija Čupić 5c79256b9b
Merge branch 'master' into 33697-pipelines-json-endpoint 2018-05-02 19:50:07 +02:00
Matija Čupić a6866fbcab
Align elements of the hash literal parameter 2018-05-02 18:00:12 +02:00
Alexis Reigel ( 🌴 may 2nd - may 9th 🌴 ) 9b33e3d36f Display and revoke active sessions 2018-05-02 08:08:16 +00:00
Kamil Trzciński 6ea31cb7cd Add stages_ajax endpoint to serve old HTML 2018-05-02 00:05:03 +02:00
Kamil Trzciński 9bb7abedf5 Fix file_store for artifacts and lfs when saving 2018-05-01 22:27:54 +02:00
Dylan Griffith 0e5c1a89f0 Fix spec/features/admin/admin_runners_spec.rb + test style improvements 2018-05-01 13:44:35 +04:00
Dylan Griffith c80e6b9c12 Merge branch 'master' into siemens-runner-per-group 2018-04-26 09:45:01 +08:00
Douwe Maan 6587d3680e Merge branch 'zj-storage-path-deprecation' into 'master'
Legacy disk path refactor

Closes gitaly#1111

See merge request gitlab-org/gitlab-ce!18364
2018-04-25 13:55:21 +00:00
Zeger-Jan van de Weg ec4423665c
Gitlab::Shell works on shard name, not path
Direct disk access is done through Gitaly now, so the legacy path was
deprecated. This path was used in Gitlab::Shell however. This required
the refactoring in this commit.

Added is the removal of direct path access on the project model, as that
lookup wasn't needed anymore is most cases.

Closes https://gitlab.com/gitlab-org/gitaly/issues/1111
2018-04-25 13:36:22 +02:00
Douwe Maan 1e624f3401 Merge branch 'jej/refactor-omniauth-controller' into 'master'
Refactor OmniauthCallbacksController to remove duplication

Closes #26559

See merge request gitlab-org/gitlab-ce!16694
2018-04-24 10:18:10 +00:00
Dylan Griffith 51cc01b6c9 Merge branch 'master' into siemens-runner-per-group 2018-04-24 17:26:08 +10:00
Lin Jen-Shin ab286656b2 Resolve "Namespace factory is problematic" 2018-04-23 15:48:26 +00:00
Alexis Reigel c585004b59
restrict projects ci controller to project runners 2018-04-23 09:21:54 +02:00
James Edwards-Jones f10c999bca Refactor OmniauthCallbacksController to remove duplication
Moves LDAP to its own controller with tests
Provides path forward for implementing GroupSaml
2018-04-22 23:50:55 +01:00
Mayra Cabrera 3327bf6247 Removes 'no job log' from trace action
'No job log' message is no longer necessary since we returned an image
when a build does not have a trace. See
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/18278 for more
details

Closes #45625
2018-04-22 10:55:17 -05:00
Douwe Maan 82fb02fff6 Merge branch '45507-fix-repository-archive-url' into 'master'
Fix specifying a non-default ref when requesting an archive using the legacy URL

Closes #45507

See merge request gitlab-org/gitlab-ce!18468
2018-04-19 14:00:32 +00:00
Nick Thomas 276d4eb80c
Fix specifying a non-default ref when requesting an archive using the legacy URL 2018-04-19 12:47:23 +01:00
Mayra Cabrera 93780da67c Resolve "Show `failure_reason` in jobs view content section" 2018-04-19 07:20:53 +00:00
Dmitriy Zaporozhets b6c6adfa51
Update invalid test application_settings_controller_spec.rb
There are 2 problems with this spec:

1. It checks for default visiblity level however there is not code in
controller to handle such default. Same check can be performed on model
directly.
2. It passes empty application_setting hash while controller requires
application_setting not to be empty by using `require` with `permit`

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-04-14 00:04:55 +03:00
Bob Van Landuyt eae2ed3366 Spec improvements for speed, reliability and readability 2018-04-12 18:05:50 +02:00
Bob Van Landuyt 71ccfde322 Correct permissions for creating merge requests from issues
This could only be possible for users that can create merge requests
within a project.

So they need to be a allowed to create a branch and create a merge request.
2018-04-11 10:51:17 +02:00
Bob Van Landuyt 12dd2b0cc0 Share collaboration check between view and presenter 2018-04-11 10:51:15 +02:00
Stan Hu 5c735af3b5 Handle legacy repository archive requests with no ref given
The legacy endpoint requires no reference and defaults to the root
ref.

Closes #45154
2018-04-08 05:56:07 -07:00
Douwe Maan 44f4a674e2 Merge branch 'jramsay-38830-tarball' into 'master'
Add alternative archive route

Closes #38830

See merge request gitlab-org/gitlab-ce!17225
2018-04-06 14:14:39 +00:00
Sean McGivern e5d32c2c0c Merge branch '43246-checkfilter' into 'master'
Resolve "Show a message when loading the issues / merge requests dashboard without filters"

Closes #43246

See merge request gitlab-org/gitlab-ce!17961
2018-04-06 13:25:18 +00:00
James Ramsay 07f517d441 Add new repository archive route
Repository archives are always named `<project>-<ref>-<sha>` even if
the ref is a commit. A consequence of always including the sha even
for tags is that packaging a release is more difficult because both
the ref and sha must be known by the packager.

- add `<project>/-/archive/<ref>/<filename>.<format>` route using the
`-` separator to prevent namespace collisions. If the filename is
`<project>-<ref>` or the ref is a sha, the sha will be omitted,
otherwise the default filename will be used.
- deprecate previous archive route `repository/<ref>/archive`
2018-04-06 08:45:17 -04:00
Shah El-Rahman 43ef375e08 Add confirmation modal to "Change username" 2018-04-06 09:36:22 +00:00
Kamil Trzciński 160b4827ed Merge branch '44665-fix-db-trace-stream-by-raw-access' into 'master'
Fix `JobsController#raw` endpoint can not read traces in database

Closes #44665

See merge request gitlab-org/gitlab-ce!18101
2018-04-05 18:33:32 +00:00
Sean McGivern f103475766 Merge branch 'osw-44295-adjust-authorization-for-discussions-show' into 'master'
Adjust 404's for LegacyDiffNote discussion rendering

Closes #44295

See merge request gitlab-org/gitlab-ce!18201
2018-04-05 17:06:05 +00:00
Oswaldo Ferreira 07f516d167 Adjust 404's for LegacyDiffNote discussion rendering 2018-04-05 12:13:42 -03:00
Shinya Maeda 2dcbaf9f0e Fix failed spec 2018-04-05 20:56:07 +09:00
Shinya Maeda 9c990bbe7a Add test 2018-04-05 20:42:08 +09:00
Tomasz Maczukin 5197b1439c
Update tests for settings/ci_cd_controller_spec 2018-04-04 21:32:32 +02:00
Tomasz Maczukin 909c277e56
Move leftovers from pipelines_settings_controller to settings/ci_cd_controller 2018-04-04 19:47:37 +02:00
Douwe Maan 57b0636c57 Merge branch 'bvl-handle-missing-attribute-when-updating-username' into 'master'
Handle invalid params when trying update_username

Closes #44925

See merge request gitlab-org/gitlab-ce!18167
2018-04-04 08:33:35 +00:00
Bob Van Landuyt 3faa7653d0 Handle invalid params when trying update_username
Using strong params to require the presence of a username when calling
`update_username`. Otherwise we'd raise a `NoMethodError` validating
the paths on disk.
2018-04-04 09:59:35 +02:00
Jan Provaznik c1b71e2fa1 Check if at least one filter is set on dashboard
When listing issues and merge requests on dasboard page,
make sure that at least one filter is enabled.

User's id is used in search autocomplete widget instead
of username, which allows presetting user in filter dropdowns.

Related to #43246
2018-04-03 20:19:09 +02:00
Jan Provaznik 65664c2eae Refactor discussions/notes code 2018-04-03 16:03:00 +00:00
Lin Jen-Shin 78ea82c3e2 Re-enable allowing n+1 Gitaly calls for cold cache
Whenever cache is enabled and cold, branches index still makes
n+1 calls. Make sure we catch this.
2018-04-03 17:16:30 +08:00
Jose Ivan Vargas 2a9a15266d Fix middle alignment for the title 2018-03-28 14:18:09 -05:00
Jose Ivan Vargas 1f02673867 Fix promoting labels and milestones copy text 2018-03-28 14:18:09 -05:00
Rémy Coutable 1104880852 Merge branch '33803-drop-json-support-in-project-milestone' into 'master'
Drop JSON support from Projects::MilestonesController#show

Closes #33803

See merge request gitlab-org/gitlab-ce!17977
2018-03-28 12:44:09 +00:00
Kamil Trzciński 51d92fb568 Merge branch '43603-ci-lint-support' into 'master'
Resolve "/ci/lint should support include keyword in config file"

Closes #43603

See merge request gitlab-org/gitlab-ce!17729
2018-03-28 08:01:33 +00:00