Commit Graph

56 Commits

Author SHA1 Message Date
GitLab Bot 3bd9ad5574 Add latest changes from gitlab-org/gitlab@master 2021-03-25 03:09:35 +00:00
GitLab Bot f986ce9ffa Add latest changes from gitlab-org/gitlab@master 2021-03-23 18:09:05 +00:00
GitLab Bot 889bf7a0ee Add latest changes from gitlab-org/gitlab@master 2021-03-16 18:11:53 +00:00
GitLab Bot 74780f24f2 Add latest changes from gitlab-org/gitlab@master 2021-03-03 09:10:53 +00:00
GitLab Bot 0cbb4a7569 Add latest changes from gitlab-org/gitlab@master 2021-01-27 15:09:15 +00:00
GitLab Bot 2ac4833015 Add latest changes from gitlab-org/gitlab@master 2020-10-08 18:08:32 +00:00
GitLab Bot c7a46b0419 Add latest changes from gitlab-org/gitlab@master 2020-08-21 00:10:44 +00:00
GitLab Bot 283fb71e02 Add latest changes from gitlab-org/gitlab@master 2020-07-17 15:09:13 +00:00
GitLab Bot 4a14cfd195 Add latest changes from gitlab-org/gitlab@master 2020-07-09 15:08:59 +00:00
GitLab Bot e33f87ac0f Add latest changes from gitlab-org/gitlab@master 2020-04-21 15:21:10 +00:00
GitLab Bot e9c2bf2678 Add latest changes from gitlab-org/gitlab@master 2020-03-03 18:08:16 +00:00
GitLab Bot 1ac794623a Add latest changes from gitlab-org/gitlab@master 2020-02-20 09:09:13 +00:00
GitLab Bot 22a0d312ae Add latest changes from gitlab-org/gitlab@master 2020-01-17 18:08:41 +00:00
GitLab Bot 80f61b4035 Add latest changes from gitlab-org/gitlab@master 2019-09-18 14:02:45 +00:00
Douglas Barbosa Alexandre a38aa7e3df
Fix N+1s queries 2019-09-10 18:54:36 -03:00
Douglas Barbosa Alexandre a2c17ce1b3
Make Rubocop happy 2019-09-09 19:31:33 -03:00
Douglas Barbosa Alexandre 16bb9433f4
Remove N+1 queries 2019-09-09 18:23:02 -03:00
Camil Staps 86eae7b2e0
Fix public/private/internal fork counts 2019-09-06 09:51:04 +02:00
Markus Koller 8fd2c08472
Make checks for continue_params more robust
The check for continue_params&.key?(:to) in Projects::ImportsController
caused an exception in redirect_to if this key contained a nil value.

Since url_for won't add any params for an empty hash, we can just return
that in continue_params if params[:continue] isn't present, and simplify
the code in the controllers to check for the values we actually want to
use.
2019-06-25 13:19:29 +02:00
gfyoung 12ee2753c1 Enable even more frozen string in app/controllers
Enables frozen string for some vestigial files as
well as the following:

* app/controllers/projects/**/*.rb
* app/controllers/sherlock/**/*.rb
* app/controllers/snippets/**/*.rb
* app/controllers/users/**/*.rb

Partially addresses #47424.
2018-09-25 22:43:49 -07:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Yorick Peterse cca61980d5
Track and act upon the number of executed queries
This ensures that we have more visibility in the number of SQL queries
that are executed in web requests. The current threshold is hardcoded to
100 as we will rarely (maybe once or twice) change it.

In production and development we use Sentry if enabled, in the test
environment we raise an error. This feature is also only enabled in
production/staging when running on GitLab.com as it's not very useful to
other users.
2018-02-01 17:00:46 +01:00
Mark Fletcher c9d40927f8 Employ ForkProjectsFinder in ForksController 2017-09-20 08:27:16 +10: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
Jacopo b996a82ff4 ProjectsFinder should handle more options
Extended ProjectFinder in order to handle the following options:
 - current_user - which user use
 - project_ids_relation: int[] - project ids to use
 - params:
   -  trending: boolean
   -  non_public: boolean
   -  starred: boolean
   -  sort: string
   -  visibility_level: int
   -  tags: string[]
   -  personal: boolean
   -  search: string
   -  non_archived: boolean

GroupProjectsFinder now inherits from ProjectsFinder.
Changed the code in order to use the new available options.
2017-04-06 07:11:37 +02:00
Cagdas Gerede 5f2d45c956 Add authentication for for create action. Add more tests for for new and create actions 2016-11-15 01:59:11 +03:00
Cagdas Gerede 4b7288f19f Add a new line after the guard statement to be compatible with the style guide. 2016-11-12 18:55:46 +03:00
Cagdas Gerede 4c562be518 Replaces conditional with guard statement. 2016-11-12 16:42:36 +03:00
Cagdas Gerede be6bcbe24e Temporary change 2016-11-12 16:41:43 +03:00
Cagdas Gerede 3b91c92719 Replace conditional with a guard statement. 2016-11-12 11:16:07 +03:00
Cagdas Gerede 4acedecc7b Fixing the issue of visiting a project fork url giving 500 error when not signed in instead of being redirected to the sign in page. The main reason is ApplicationController skips authentication if the project exists. To fix the issue, forced the authentication in ForksController when current_user is nil. 2016-11-10 04:08:45 +03:00
Robert Speicher 085538c2bd Use the configured Kaminari "per page" default 2016-03-19 17:37:54 -04:00
Zeger-Jan van de Weg dfb96ed84b ContinueToParams -> ContinueParams 2016-03-13 13:13:19 +01:00
Zeger-Jan van de Weg 1cefb73a9c Check redirect path in the continue_params
Fixes
https://dev.gitlab.org/gitlab/gitlabhq/issues/2649
https://gitlab.com/gitlab-org/gitlab-ce/issues/13956
2016-03-13 13:13:19 +01:00
Dmitriy Zaporozhets 11b6aeafba Merge branch 'refactor-projects-list' into 'master'
Refactor projects list

1. Fix double bottom border if pagination
2. Fix broken search on forks page
4. Remove duplicate js logic
4. Remove unused show all link
5. Remove duplicate “no project” message in different views

After this merge request you can easily render shared projects template
with all necessary html/js included to make searchable list with
pagination. All you need to provide is controller that returns
projects list with seach nad pagination and render html form with
project-filter-form id and text field with filter_projects name.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

cc @jschatz1 @DouweM 

See merge request !3075
2016-03-03 14:35:41 +00:00
Dmitriy Zaporozhets 7455d950bc
Refactor projects list
1. Fix double bottom border if pagination
2. Fix broken search on forks page
4. Remove duplicate js logic
4. Remove unused show all link
5. Remove duplicate “no project” message in different views

After this merge request you can easily render shared projects template
with all necessary html/js included to make searchable list with
pagination. All you need to provide is controller that returns
projects list with seach nad pagination and render html form with
project-filter-form id and text field with filter_projects name.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-03-03 13:09:58 +01:00
Rubén Dávila 49e4ef3b41 Add specs to ForksController#index.
* Also refactor query to get projects accessible for current user.
  ProjectsFinder actually return public projects when no user is passed.
2016-03-02 12:35:56 -05:00
Rubén Dávila 0e1d440805 Reuse query from ProjectsFinder to get projects accessible to current user. 2016-03-01 12:48:09 -05:00
Rubén Dávila 8c948548e1 Logged in user should be able to read internal forks. 2016-02-27 10:04:36 -05:00
Rubén Dávila f96ce4079f Improve implementation to check read access to forks and add pagination. 2016-02-26 19:34:52 -05:00
Achilleas Pipinellis c6e0db03eb Mention project name in fork notice 2016-02-19 17:06:14 +01:00
Rubén Dávila 91bd0bf99e Some CSS and sorting fixes. 2016-01-20 00:17:21 -05:00
Rubén Dávila 40e1ad9052 Add ability to sort forks. #2406 2016-01-20 00:14:58 -05:00
Rubén Dávila b2e5b57fab Add fork button and implement ability to distinguish between public and protected forks. #2406 2016-01-20 00:14:58 -05:00
Rubén Dávila 2b05bf4be5 Use Project creator's avatar in fork listing. #2406 2016-01-20 00:14:58 -05:00
Rubén Dávila 7765ce1875 Setup new fork link in sidebar and routes. #2406 2016-01-20 00:14:58 -05:00
Douwe Maan c910bca730 Add tests for new functionality 2015-12-21 11:57:51 +01:00
Douwe Maan f4f4a6b530 Fix specs and behavior for LFS files 2015-12-18 16:14:12 +01:00
Douwe Maan d9c82d679f Automatically fork a project when not allowed to edit a file. 2015-12-18 10:03:34 +01:00
Stan Hu 9995f0806b Import forked repositories asynchronously to prevent large repositories from timing out
Use import_status to track async import status and give feedback to the user

Closes #2388
Closes #2400
2015-09-11 00:34:04 -07:00