Commit Graph

66 Commits

Author SHA1 Message Date
GitLab Bot 6e2c0f81af Add latest changes from gitlab-org/gitlab@master 2023-07-18 06:08:27 +00:00
GitLab Bot 18869e31e6 Add latest changes from gitlab-org/gitlab@master 2022-11-22 21:10:22 +00:00
GitLab Bot 59f160b0cf Add latest changes from gitlab-org/gitlab@master 2022-02-22 12:14:09 +00:00
GitLab Bot cc2623bcc3 Add latest changes from gitlab-org/gitlab@master 2022-02-01 00:14:06 +00:00
GitLab Bot a15c9bc9eb Add latest changes from gitlab-org/gitlab@master 2021-12-06 18:14:09 +00:00
GitLab Bot 60aef5496e Add latest changes from gitlab-org/gitlab@master 2021-11-12 18:12:20 +00:00
GitLab Bot 65688a5092 Add latest changes from gitlab-org/gitlab@master 2021-08-09 09:22:41 +00:00
GitLab Bot f5eabcfa0e Add latest changes from gitlab-org/gitlab@master 2021-07-01 09:07:33 +00:00
GitLab Bot d6ae5ba9df Add latest changes from gitlab-org/gitlab@master 2021-05-31 06:10:40 +00:00
GitLab Bot 0ae8428c8e Add latest changes from gitlab-org/gitlab@master 2021-05-11 21:10:21 +00:00
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