Commit Graph

182 Commits

Author SHA1 Message Date
GitLab Bot f3b1e07903 Add latest changes from gitlab-org/gitlab@master 2020-04-06 15:10:04 +00:00
GitLab Bot fca89bb73f Add latest changes from gitlab-org/gitlab@master 2020-03-11 21:09:19 +00:00
GitLab Bot 1c8fa70f9d Add latest changes from gitlab-org/gitlab@master 2020-02-28 18:09:07 +00:00
GitLab Bot 866ca4e49f Add latest changes from gitlab-org/gitlab@master 2020-02-14 21:09:08 +00:00
GitLab Bot 76623c12c1 Add latest changes from gitlab-org/gitlab@master 2020-02-05 21:09:02 +00:00
GitLab Bot c1924b863a Add latest changes from gitlab-org/gitlab@master 2020-01-28 21:08:56 +00:00
GitLab Bot 22e9af3c8b Add latest changes from gitlab-org/gitlab@master 2020-01-27 12:08:35 +00:00
GitLab Bot 6755df108b Add latest changes from gitlab-org/gitlab@master 2020-01-21 00:08:46 +00:00
GitLab Bot 6593f1f627 Add latest changes from gitlab-org/gitlab@master 2019-12-24 09:07:44 +00:00
GitLab Bot fe0fbe3838 Add latest changes from gitlab-org/gitlab@master 2019-12-23 03:08:10 +00:00
GitLab Bot 7f8330873c Add latest changes from gitlab-org/gitlab@master 2019-12-18 21:07:37 +00:00
GitLab Bot e723867717 Add latest changes from gitlab-org/gitlab@master 2019-12-17 18:07:48 +00:00
GitLab Bot 123c68a7cf Add latest changes from gitlab-org/gitlab@master 2019-12-16 18:08:22 +00:00
GitLab Bot 6a7cc8c147 Add latest changes from gitlab-org/gitlab@master 2019-12-05 18:07:51 +00:00
GitLab Bot c384315ae1 Add latest changes from gitlab-org/gitlab@master 2019-12-03 09:09:09 +00:00
GitLab Bot 759bab0585 Add latest changes from gitlab-org/gitlab@master 2019-11-08 15:06:21 +00:00
GitLab Bot d8ccc7a00b Add latest changes from gitlab-org/gitlab@master 2019-11-07 18:06:21 +00:00
GitLab Bot d15180e00b Add latest changes from gitlab-org/gitlab@master 2019-11-06 09:06:23 +00:00
GitLab Bot 8f210aebe1 Add latest changes from gitlab-org/gitlab@master 2019-10-31 21:06:28 +00:00
GitLab Bot acdf997e1a Add latest changes from gitlab-org/gitlab@master 2019-10-29 06:06:14 +00:00
GitLab Bot 8c7eab92cd Add latest changes from gitlab-org/gitlab@master 2019-10-23 03:06:01 +00:00
GitLab Bot b925465787 Add latest changes from gitlab-org/gitlab@master 2019-09-23 21:06:29 +00:00
Jesse Hall d17f89f307 Start of fix for #21859, allow users to open files with newlines in the filenames. 2019-09-10 12:28:18 +00:00
Dmitriy Zaporozhets 914c7c25eb Add routing spec for deploy_tokens controller
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-07-10 15:58:34 +00:00
Luke Duncalfe ba377e91e1 Authorize access before serving project template
Previously, if a user was a guest member of a private project, they
could access the merge request template as we were not checking
permission-levels of the user.

When a issue template is asked for, the user must have :read_issue for
the project; or :read_merge_request when a merge request template is
asked for.

We also now rescue_from FileNotFoundError and handle as 404. This is
because RepoTemplateFinder can raise a FileNotFoundError exception,
which Rails previously handled as a 500.

Handling these in a way that is consistent with
ActiveRecord::RecordNotFound exceptions, within controllers that
inherit from Projects::ApplicationController at least, and returning a
404.

https://gitlab.com/gitlab-org/gitlab-ce/issues/54943
2019-06-11 08:21:04 +12:00
Dmitriy Zaporozhets 8249fcf54b Move some project routes under - scope
Affected project routes are:

* services
* boards
* releases
* forks
* group_links
* import
* avatar
* labels
* milestones

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-05-29 16:31:04 +03:00
Dmitriy Zaporozhets e6442ddef7
Move some project routes under - scope
Affected routes are:

* autocomplete_sources
* project_members
* deploy_keys
* deploy_tokens

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-05-26 00:17:13 +03:00
Dmitriy Zaporozhets eef6f76821
Add network and graphs to legacy routes too
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-05-21 12:15:37 +03:00
Dmitriy Zaporozhets 6d3f5a3341
Add legacy routes for modified project path
For settings, branches and tags

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-05-21 11:35:29 +03:00
Dmitriy Zaporozhets 70decdc2ac
Fix specs to match route changes
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-05-20 15:21:37 +03:00
Dmitriy Zaporozhets f13edec8c7 Add ability to resolve project id into path
By visiting `projects/:id` you will be redirected to project page with
path in it.

projects/123 => foo/bar

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-01-22 09:59:10 +02:00
Douwe Maan 8403eee8a5
Revert "Resolve "[Rails5] `ActionView::MissingTemplate` in spec/features/projects/wiki/user_views_wiki_page_spec.rb""
This reverts commit 1292b99b74.
2018-12-03 12:28:51 +01:00
Fabian Schneider b55c320c89 Resolve "Drop down filter for project snippets" 2018-10-05 09:42:38 +00:00
Semyon Pupkov 6c31b607de Fix SpaceBeforeFirstArg cop 2018-09-20 21:47:34 +05:00
Francisco Javier López 539d274563 [master] Missing CSRF in System Hooks resend action 2018-08-24 16:52:23 +00:00
Francisco Javier López 2408519e08
Changing the hook test action to use POST 2018-07-23 12:05:48 -04:00
blackst0ne 1292b99b74 Resolve "[Rails5] `ActionView::MissingTemplate` in spec/features/projects/wiki/user_views_wiki_page_spec.rb" 2018-06-12 11:30:13 +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
Felipe Artur 2f8577d45e Allow promoting project milestones to group milestones 2017-10-31 15:03:52 +00:00
haseeb 4974f1ef86 fix #3686 make tarball download url to end with extension 2017-08-03 16:44:48 +00:00
Rémy Coutable ddccd24c13 Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Grzegorz Bizon 9f36012e02 Fix docker tag reference routing constraints 2017-07-19 10:30:57 +02:00
Douwe Maan 70b05a8377 Split up MergeRequestsController 2017-06-28 18:17:44 -05:00
Robert Speicher a6ec5121f0 Correct RSpec/SingleLineHook cop offenses 2017-06-14 13:18:56 -05:00
Alexander Randa 3d70eeb5bb Implement ability to update deploy keys 2017-06-02 19:44:36 +03:00
Dmitriy Zaporozhets 1ed7b7629a Merge branch '17848-web-hook-logging' into 'master'
Implement Web Hooks calls logging

Closes #17848

See merge request !11027
2017-05-25 13:26:12 +00:00
Alexander Randa 330789c23c Implement web hooks logging
* implemented logging of project and system web hooks
* implemented UI for user area (project hooks)
* implemented UI for admin area (system hooks)
* implemented retry of logged webhook
* NOT imeplemented log remover
2017-05-25 10:07:52 +03:00
Douwe Maan 4345bb8c50 Fix ambiguous routing issues by teaching router about reserved words 2017-05-23 20:38:24 -05:00
Oswaldo Ferreira 3e08713c79 Remove route 2017-05-19 10:12:02 -03:00
Michael Kozono 7d02bcd2e0 Redirect from redirect routes to canonical routes 2017-05-05 12:11:57 -07:00
Alexander Randa c504b88f07 Implement ability to update hooks 2017-04-28 11:49:57 +00:00
Douwe Maan 00c4e14103 Remove format from end of URL for URLs that take a ref or path 2017-04-17 19:03:21 -05:00
Eric Eastwood e6fc0207cb Use native unicode emojis
- gl_emoji for falling back to image/css-sprite when the browser
   doesn't support an emoji
 - Markdown rendering (Banzai filter)
 - Autocomplete
 - Award emoji menu
    - Perceived perf
    - Immediate response because we now build client-side
 - Update `digests.json` generation in gemojione rake task to be more
   useful and  include `unicodeVersion`

MR: !9437

See issues

 - #26371
 - #27250
 - #22474
2017-03-06 12:54:46 -06:00
Adam Niedzielski 0a31efb577 Remove query parameters from notes polling endpoint to make caching easier 2017-03-01 16:34:28 +01:00
James Edwards-Jones 1af3f3b673 Merge branch 'master' into jej-pages-picked-from-ee 2017-02-03 17:25:26 +00:00
Adam Pahlevi a0586dbc16 replace `find_with_namespace` with `find_by_full_path`
add complete changelog for !8949
2017-02-03 07:14:04 +07: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
Luke Bennett 1356e40f22
Changed autocomplete_sources into an action that returns a single 'at' type of sources at a time
Finished up autocomplete_sources action and added frontend to fetch data only when its needed

Added wait_for_ajax to specs

Fixed builds and improved the setup/destroy lifecycle

Changed global namespace and DRYed up loading logic

Added safety for accidentally loading data twice

Removed destroy as its not necessary and is messing with click events from a blur race condition

Created AutocompleteSourcesController and updated routes

Fixed @undefined from tabbing before load ends

Disable tabSelectsMatch until we have loaded data

Review changes
2016-12-15 15:20:33 +00:00
Dmitriy Zaporozhets 6683fdcfb0
Add nested groups support to the routing
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-11-23 14:08:36 +02:00
Sean McGivern 1022456bb1 Allow browsing branches that end with '.atom'
We need to do two things to support this:

1. Simplify the regex capture in the routing for the CommitsController
   to not exclude the '.atom' suffix. That's a perfectly valid git
   branch name, so we shouldn't blow up if we get it.
2. Because Rails now can't automatically detect the request format, add
   some code to do so in `ExtractPath` when there is no path. This means
   that, given branches 'foo' and 'foo.atom', the Atom feed for the
   former is unroutable. To fix this: don't do that! Give the branches
   different names!
2016-10-11 13:31:12 +01:00
Christopher Bartz ecb3f1eb6c Rename `markdown_preview` routes to `preview_markdown` 2016-08-11 15:54:18 +02:00
winniehell ae9f0ca818 Add failing test for #20462 2016-08-02 03:32:28 +02:00
Josef Strzibny 34a1e9633f Clean up unused routes 2016-07-26 12:06:42 +02:00
Grzegorz Bizon 9e211091a8 Enable Style/EmptyLines cop, remove redundant ones 2016-07-01 21:56:17 +02:00
Robert Speicher d97742570f Increase the minimum length for commit SHA matching to 7
This is the git default and will help to prevent false positive matches.

Closes #12706
2016-01-29 19:52:29 -05:00
Rubén Dávila e4d2696691 Fix broken specs. #2406 2016-01-20 00:14:58 -05:00
Drew Blessing c1e974ed88 Merge branch 'issue_3076' into 'master'
Fix problem with projects ending with .keys #3076

Closes #3076

Move route `:username.keys` below project's routes. This allow project's to handle names ending with `.keys`

See merge request !1883
2016-01-08 15:52:05 +00:00
Jacob Vosmaer 41b8a238ce Merge branch 'master' of github.com:gitlabhq/gitlabhq 2016-01-07 12:56:18 +01:00
Jose Corcuera 0b2fa3bfa4 Fix problem with projects ending with .keys #3076 2016-01-06 09:54:43 -05:00
Dmitriy Zaporozhets 3e259ea8bc Revert "Merge branch 'revert-satellites' into 'master' "
This reverts commit 5daf44b7c8, reversing
changes made to 2f706fbd23.
2015-08-11 14:33:31 +02:00
Dmitriy Zaporozhets 9f10943c1a
Revert "Merge branch 'drop-satellites'"
This reverts commit 957e849f41, reversing
changes made to 6b9dbe9f5a.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-11 10:28:42 +02:00
Dmitriy Zaporozhets 44ac823e59
Improve tests to use real branches in merge requests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-04 17:20:26 +02:00
Robert Speicher 6e5473f930 Remove show actions from Admin and Project DeployKeys 2015-06-03 18:03:04 -04:00
Robert Speicher f46b367068 Add MergeRequests#commits action and route
/:namespace_id/:project_id/merge_requests/:id/commits(.:format)
2015-05-29 00:09:28 -04:00
Douwe Maan a243e44ca1 Fix failing specs. 2015-04-03 12:23:20 +02:00
Douwe Maan 31fc73f0a9 Use `project_member` instead of `team_member`. 2015-03-15 13:50:38 +01:00
Vinnie Okada 76aad9b76e Upgrade to Rails 4.1.9
Make the following changes to deal with new behavior in Rails 4.1.2:

* Use nested resources to avoid slashes in arguments to path helpers.
2015-02-14 11:09:23 -07:00
Jeroen van Baarsen 0c4a70a306 Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:17:35 +01:00
Douwe Maan 639c93b4f2 Don't have Markdown preview fail for long content by using POST rather than GET.
See https://github.com/gitlabhq/gitlabhq/issues/8611.
2015-02-06 11:23:12 +01:00
Dmitriy Zaporozhets 90ba3a385c Fix tests for blobs refactoring 2015-01-26 16:08:59 -08:00
Hannes Rosenögger 70c44a0da2 Fix tests, merge conflicts, some minor issues and make the project avatar feature mergable 2015-01-24 18:51:16 +01:00
Steven Thonus 42bac7f9f2 adding avatar to project settings page added avatar removal show project avatar on dashboard, projects page, project page added rspec and feature tests added project avatar from repository new default project icon added added copying af avatar to forking of project added generated icon fixed avatar fork hound fix style fix test fix 2015-01-24 18:51:16 +01:00
Dmitriy Zaporozhets 6a5766e370 Merge pull request #7978 from cirosantilli/edit-preview-route-test
Add tests for tree edit routes
2014-12-20 20:17:25 +02:00
Dmitriy Zaporozhets 65b858a776 Merge branch 'show_files_with_diff_name' into 'master'
Show files named diff

Fixes #1749

See merge request !1318
2014-12-11 14:07:12 +00:00
Marin Jankovski 22368fb8e8 Add a failing route spec for file named diff. 2014-12-10 15:52:56 +01:00
Vinnie Okada 742e6eeed2 Merge branch 'upstream-master' into markdown-preview
Conflicts:
	spec/routing/project_routing_spec.rb
2014-12-07 20:25:58 -07:00
Dmitriy Zaporozhets d2c3c98e3c
Routing specs for fork projects
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-11-14 12:55:13 +02:00
Vinnie Okada cd3eabd712 Use GET instead of POST for Markdown previews 2014-10-16 22:45:13 -05:00
Vinnie Okada 5700842ba8 Add Markdown preview to more forms
Enable Markdown previews when creating and editing issues, merge
requests, and milestones, and when editing notes.
2014-10-15 23:52:33 -05:00
Ciro Santilli f4efb19038 Add tests for tree edit routes
Critical because of possible confusion between /:id/preview
and /:id for a path that ends in preview.
2014-10-07 10:04:09 +02:00
Dmitriy Zaporozhets d593c98fcb
Delete wall notes tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-06-13 14:29:26 +03:00
sue445 a3d8be09c6 Fix can not automerge if description is too long 2014-05-11 23:50:14 +09:00
Jason Hollingsworth 7cc2520541 Add support for various archive formats.
Used mime-types gem instead of hardcoding content types.
Allow multiple extensions in archive route (.tar.gz, .tar.bz2).
Change content disposition from infile(?) to attachment for api.
Fixed api would return “archive” instead of {project}-{hash}.{ext}
2014-01-02 10:18:56 -06:00
Peter Fern 05c988419f Expand refs constraints to include valid characters
Fixes #4831, #4865, #4932
2013-10-24 16:31:15 +11:00
Hiroyuki Sato df9cbbc924 Drop support of root namespace in routing 2013-09-13 07:00:24 +09:00
Dmitriy Zaporozhets d2284b4112 Fix routing specs 2013-07-17 08:43:56 +03:00
Dmitriy Zaporozhets ee890f2b2a Merge branch 'master' into 6-0-dev
Conflicts:
	app/views/dashboard/projects.html.haml
	app/views/layouts/_head_panel.html.haml
	config/routes.rb
2013-07-02 11:47:09 +03:00
Jack Weeden b62c9e5991 Prevent 'toplevel constant SnippetsController referenced by Project::SnippetsController' warning 2013-07-01 10:48:01 +01:00
Dmitriy Zaporozhets f438bd415f Merge branch 'master' into 6-0-dev
Conflicts:
	app/controllers/admin/teams/projects_controller.rb
	app/views/team_members/_team_member.html.haml
	app/views/teams/members/_member.html.haml
2013-06-30 11:35:40 +03:00
Yves Senn 3b9e3021ee fix bad constant reference in `project_routing_spec.rb`. 2013-06-24 18:57:49 +02:00