Commit Graph

432 Commits

Author SHA1 Message Date
Imre Farkas 9bc5ed14fe Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE 2019-04-09 15:38:58 +00:00
Stan Hu 0d8e9f6ee3 Expand FindCommit caching to blob and refs
This enables FindCommit caching to the following actions:

* BlobController#show
* RefsController#logs_tree

It also improves caching in CommitsController since some
duplicate requests were occuring inside the before_action
definitions.
2019-04-06 05:16:22 -07:00
Andreas Brandl 0cf23a7f50 Merge branch 'revert-3962b00b' into 'master'
Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"

See merge request gitlab-org/gitlab-ce!27051
2019-04-05 14:28:34 +00:00
Andreas Brandl 46b1b9c1d6 Revert "Merge branch 'if-57131-external_auth_to_ce' into 'master'"
This reverts merge request !26823
2019-04-05 13:02:56 +00:00
Stan Hu f1dce21609 Enable FindCommit caching for project and commits pages
This reduces a handful of duplicate FindCommit calls while viewing the
projects and commits pages.
2019-04-05 04:52:42 -07:00
Imre Farkas d9d7237d2e Move Contribution Analytics related spec in spec/features/groups/group_page_with_external_authorization_service_spec to EE 2019-04-05 11:45:47 +00:00
Małgorzata Ksionek b7ecf43388 Add cr remarks 2019-03-25 11:08:20 +01:00
Małgorzata Ksionek 0b324d3463 Disallow changing namespace of a project in update method 2019-03-20 14:52:18 +01:00
Rubén Dávila 24226b9fe2 Update last_activity_on for Users on some main GET endpoints
In order to have an accurate date about the last activity of a User
we need to update the last_activity_on field when the User is visiting
some basic pages of GitLab like pages related to Dashboards, Projects,
Issues and Merge Requests
2019-02-05 09:55:31 -05: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
Tiago Botelho 8772bdabb2
Project guests no longer are able to see refs page
Adds download_code authorization check to ProjectsController#refs
action, to prevent a project guest from seeing branch, tags and
commits information
2018-12-19 10:21:02 +00:00
Cindy Pallares fe5f75930e
Merge branch 'security-fix-pat-web-access' into 'master'
[master] Resolve "Personal access token with only `read_user` scope can be used to authenticate any web request"

See merge request gitlab/gitlabhq!2583
2018-11-28 19:13:59 -05:00
George Tsiolis 733ae94921 Fix typos in comments and specs 2018-11-01 08:59:20 +02:00
Tuomo Ala-Vannesluoma c84b60b164 Make GitLab pages support access control 2018-10-05 13:41:11 +00:00
Tiago Botelho 81d949f656 Applies the CE backport of EE#657 2018-09-24 12:02:01 +01:00
gfyoung 73322a0e55 Enable frozen string in app/controllers/**/*.rb
Enables frozen string for the following:

* app/controllers/*.rb
* app/controllers/admin/**/*.rb
* app/controllers/boards/**/*.rb
* app/controllers/ci/**/*.rb
* app/controllers/concerns/**/*.rb

Partially addresses #47424.
2018-09-18 21:22:45 -07:00
James Lopez e72aeccdae Resolve "Unable to import repository: undefined method `import_file' for nil:NilClass" 2018-09-17 10:52:49 +00: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
James Lopez f1277fbf0b
refactor code based on feedback 2018-09-07 14:43:51 +02:00
James Lopez 27442862cf
refactor code based on feedback 2018-09-07 13:42:49 +02:00
James Lopez a2aa505805
Refactor code to remove object storage flag from Import/Export
Updated docs, refactor import/export code
Fix AvatarUploader path issue
Fix project export upload webhook error
2018-09-06 16:52:42 +02:00
Winnie Hellmann 743add978a Move badge settings to general settings 2018-09-03 13:16:23 +00:00
Mike Greiling 0f77d24be8 Keep project settings sections expanded after submitting form 2018-08-08 10:57:34 +00:00
James Ramsay 79d90cb6bd Use Projects::UpdateService to archive projects
System hooks were not being triggered when projects were archived or
unarchived. Reuse the Projects::UpdateService to automatically
trigger system hooks and increase code reuse.
2018-08-03 11:55:21 -04:00
Lin Jen-Shin 4ee08b77bc Updates from `rubocop -a` 2018-07-09 21:13:08 +08:00
James Lopez a2bf164154
Update Import/Export to use object storage (based on aa feature flag) 2018-07-06 15:46:18 +02:00
Imre Farkas 9561db7b8c
Add option to add README when creating a project 2018-07-04 17:35:23 +02:00
Aram Visser 0d22b2141f Set flash error message only for current request when updating project 2018-06-25 10:19:13 +07:00
Hiroyuki Sato 59154779d8 The json keys of ref switcher should not be translated 2018-06-20 13:02:08 +09:00
blackst0ne eddf3febd7 [Rails5] Add `safe_params` helper
Rails 5.0 requires to explicitly permit attributes when building a URL
using current `params` object.

The `safe_params` helper allows developers to just call `safe_params.merge(...)`
instead of manually adding `permit` to every call.

https://github.com/rails/rails/pull/20868
2018-04-08 15:35:30 +11:00
Tomasz Maczukin 99caa5bb04
Use ChronicDurationAttribute to handle CI/CD timeout setting 2018-04-04 19:47:37 +02:00
Robert Speicher 2e87923dcb Merge branch 'ce-3839-ci-cd-only-projects-fe' into 'master'
Create CI/CD-only projects by URL -- CE backport

See merge request gitlab-org/gitlab-ce!17342
2018-03-05 22:43:27 +00:00
Eric Eastwood 32d121343d CI/CD-only projects FE
See https://gitlab.com/gitlab-org/gitlab-ee/issues/3839

Conflicts:
	app/assets/javascripts/projects/project_new.js
	app/views/shared/_import_form.html.haml
	ee/app/controllers/ee/projects_controller.rb
	ee/spec/features/projects/new_project_spec.rb
	locale/gitlab.pot
2018-03-05 13:26:34 -06:00
Dmitriy Zaporozhets 8fe9995f11
Replace deprecated name_with_namespace with full_name in app and spec
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2018-03-05 16:15:26 +02:00
Eric Eastwood 8ae57909a1 Backport BE changes from CI/CD projects ee!4567
See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4567
2018-03-02 17:17:05 -06:00
Phil Hughes 981b5905a0 Merge branch '43261-fix-import-from-url-name-collision-active-tab' into 'master'
Keep "Import project" tab/form active when validation fails trying to import  "Repo by URL"

Closes #43261

See merge request gitlab-org/gitlab-ce!17136
2018-02-23 09:18:48 +00:00
Oswaldo Ferreira a8c523d98b Move project presenter instance creation to controller 2018-02-22 13:59:14 -03:00
Sean McGivern c2fc40668c Refactor IssuableFinder to extract model-specific logic
By extracting a new `filter_items` method, we can override that in the
IssuesFinder and MergeRequestsFinder separately, so we don't need checks that
the model is the correct one, because we can just use the class we're in to know
that.

We can do the same for the VALID_PARAMS constant, by making it a class method.
2018-02-21 10:31:29 +00:00
Eric Eastwood 2aacb7fb43 Make import tab/form active when importing project by URL and validation fails
See https://gitlab.com/gitlab-org/gitlab-ce/issues/43261
2018-02-20 13:06:13 -06:00
Rémy Coutable 4d64524b0d Merge branch 'query-counts' into 'master'
Track and act upon the number of executed SQL queries

See merge request gitlab-org/gitlab-ce!16466
2018-02-05 10:04:43 +00:00
Mario de la Ossa eaada9d706 use Gitlab::UserSettings directly as a singleton instead of including/extending it 2018-02-02 18:39:55 +00: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
Takuya Noguchi 2b6307f6ad Enable RuboCop Style/RegexpLiteral 2018-02-01 02:06:07 +09:00
🙈 jacopo beschi 🙉 729f05f0e3 Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
Jacob Vosmaer 176b60d110 Remove the Project#repo method 2018-01-04 18:38:39 +01:00
Douwe Maan 1baea77438 Merge branch 'lfs-badge' into 'master'
Added LFS badge to indicate LFS tracked files

Closes #15567

See merge request gitlab-org/gitlab-ce!15845
2017-12-15 09:02:24 +00:00
Phil Hughes cbd3ce8f41
moved lfs_blob_ids method into ExtractsPath module 2017-12-14 11:59:01 +00:00
Phil Hughes 7d2affeff1
moved lfs blob fetch from extractspath file 2017-12-14 10:10:20 +00:00
Douwe Maan d332c8c78a Merge branch '36679-non-authorized-user-may-see-wikis-or-pipeline-page' into 'security-10-2'
Fixes project visibility guidelines

See merge request gitlab/gitlabhq!2226

(cherry picked from commit 877c42c0aaf3298d6001614c9706bc366ae4014c)

e4fd1c26 Ensure project wiki visibility guidelines are met
2017-12-08 13:44:36 -08:00
Jan Provaznik 8cce70730c Create merge request from email
* new merge request can be created by sending an email to the specific
email address (similar to creating issues by email)
* for the first iteration, source branch must be specified in the mail
subject, other merge request parameters can not be set yet
* user should enable "Receive notifications about your own activity" in
user settings to receive a notification about created merge request

Part of #32878
2017-12-05 08:41:58 +01:00