Commit Graph
22224 Commits
Author SHA1 Message Date
Daniel Gerhardt 4a0e4c857f Fix access to disabled features for unauthenticated users
Unauthenticated users had access to disabled features of public
projects. The code has been slightly refactored so that feature checks
are done in a separate method and can also be applied for public access.
2015-07-20 09:45:24 +02:00
Stan Hu e1811316d7 Remove repository graph log to fix slow cache updates after push event
Recalculating graph_log took minutes on a large repository since each
of the 6000 commits would need to calculate the diff. Since graph_log
does not appear to be used, remove it from the list of things to update.
For the Linux kernel repository, this reduced the ProjectCacheWorker time
from 8+ minutes to 16 seconds.

Closes #2016
2015-07-19 22:53:14 -07:00
Stan Hu e5a12596ab Merge branch 'fix-unauthenticated-label-access' into 'master'
Fix label read access for unauthenticated users

The label page was added to navigation for unauthorized users because
the previously used milestone read permission was still checked. This
has been fixed and read access to labels is now granted (again) for
public projects.

This regression has been introduced in
07efb17e10 (7.12).

See also 9bcd36396b.

Refs !836, !842.

See merge request !1000
2015-07-20 03:29:13 +00:00
Sven Strickroth 5eeab9f0a6 GoogleCode importer: Do not care about casing of image file extensions
Signed-off-by: Sven Strickroth <email@cs-ware.de>
2015-07-20 00:53:43 +02:00
Valery Sizov d0ef64ac8e Merge branch 'rs-issue-2001' into 'master'
Dynamically check `:admin_*` ability in issuable context

Closes #2001

See merge request !1002
2015-07-19 21:27:38 +00:00
Robert Speicher e65b081062 Dynamically check :admin_* ability in issuable context
Closes #2001
2015-07-19 16:48:33 -04:00
Daniel Gerhardt 69417d36b2 Fix label read access for unauthenticated users
The label page was added to navigation for unauthorized users because
the previously used milestone read permission was still checked. This
has been fixed and read access to labels is now granted (again) for
public projects.

This regression has been introduced in
07efb17e10 (7.12).

See also 9bcd36396b.

Refs !836, !842.
2015-07-19 21:33:21 +02:00
Valery Sizov e8aaf56803 Merge branch 'fix-mixed-color-preview' into 'master'
Fix bug where notes were being rendered with wrong color preferences due to caching

### What does this MR do?

This MR adds the user's color preferences as part of the caching key for notes.

### Why was this MR needed?

This should fix a bug introduced via 4d80360b where notes were being loaded from the cache without regard to the current user's color scheme.

### What are the relevant issue numbers?

Closes #2008

See merge request !994
2015-07-19 09:19:30 +00:00
Stan Hu 247609a3d8 Merge branch 'fix-oauth-redirection' into 'master'
Fix OAuth provider bug where GitLab would not go return to the redirect_uri after sign-in

### What does this MR do?

This MR fixes a bug when GitLab is used as an OAuth provider (e.g. to GitLab CI) where the user is not redirected back to the original URI after a successful sign-in. This MR tweaks the Doorkeeper configuration to set the `user_return_to` Devise session variable, as mentioned in this [Stack Overflow](http://stackoverflow.com/questions/14504739/how-to-use-both-devise-and-doorkeeper-gems) post.

### Why was this MR needed?

If you attempt to "Login via GitLab" from GitLab CI and aren't logged out completely, GitLab asks for your username and password. After you login, you get directed to the GitLab dashboard instead of back to GitLab CI. It's easy to reproduce:

1. Set up a GitLab CI and GitLab instance (e.g. ci.gitlab.com, gitlab.com).
2. Start an Incognito Window so that you are logged out of GitLab CI and GitLab.
3. Go to the GitLab CI instance. Click the "Login with GitLab".
4. Enter in your credentials.
5. Watch your browser login to GitLab and not return to GitLab CI.

### What are the relevant issue numbers?

Closes #1612

See merge request !998
2015-07-19 07:06:21 +00:00
Stan Hu 19163f84fb Fix OAuth provider bug where GitLab would not go return to the redirect_uri after sign-in
Closes #1612
2015-07-18 15:57:11 -07:00
Robert Speicher 2940263aac Merge branch 'rs-issue-2013' into 'master'
Show the first tab automatically on MergeRequests#new

Closes #2013

See merge request !997
2015-07-18 22:26:52 +00:00
Robert Speicher f92bbd2f28 Show the first tab automatically on MergeRequests#new
Closes #2013
2015-07-18 18:05:07 -04:00
Robert Speicher a364d4260d Make username parameter for Users#show case-insensitive
Closes #2012
2015-07-18 17:54:56 -04:00
Robert Speicher 26a9faab25 Merge pull request #9452 from YorickPeterse/master
Only load byebug on MRI
2015-07-18 16:43:27 -04:00
Stan Hu 682c0deffe Remove redundant last push event if activity feed is set to main page
Closes #2009
2015-07-18 08:02:38 -07:00
Stan Hu 875d8e7f31 Fix bug where notes were being rendered with wrong color preferences due to caching
Closes #2008
2015-07-18 07:32:18 -07:00
Yorick Peterse 58b94be9a7 Only load byebug on MRI
This Gem relies on MRI specific debugging APIs. This at least allows
installation on Rubinius/JRuby.
2015-07-18 14:08:59 +02:00
Stan Hu 895d988d55 Merge branch 'fix-note-edit-upload-link' into 'master'
Fix file upload dialog for comment editing

This fixes the file upload dialog which currently works for new comments
but not for comment editing. The cause for this is a missing DOM class
which causes traversal to the dropzone to fail.

This is fixed by adding the expected `gfm-form` class to the edit form.
It has to be added dynamically since adding it to the form template
would break the form's layout and comment saving.

The following screenshot illustrates the issue:
![gitlab-dropzone-upload-dialog-bug](https://gitlab.com/gitlab-org/gitlab-ce/uploads/3a9885c8ba7c07338148ec9e605e5771/gitlab-dropzone-upload-dialog-bug.png)

See merge request !956
2015-07-18 06:06:59 +00:00
Stan Hu f33fe50f0d Disable internal issue tracker if external tracker in use
Closes #2006
2015-07-17 22:59:31 -07:00
Robert Speicher 6615428679 Merge branch 'rs-issue-988-test' into 'master'
Add test case for clicking line number anchor icon

Follow-up to !988

See merge request !992
2015-07-18 01:12:06 +00:00
Robert Speicher dd6daf4656 Add test case for clicking line number anchor icon 2015-07-17 20:40:56 -04:00
Robert Speicher 4998f7a0b5 Merge branch 'fix-line-highlighter-link-click' into 'master'
Fix bug where clicking on the link icon on a file would result in "#Lundefined" in the URL

Closes #2002

See merge request !988
2015-07-18 00:39:08 +00:00
Stan Hu 5f4dcbf8be Set OmniAuth full_host parameter to ensure redirect URIs are correct
Closes #1967
2015-07-17 16:24:19 -07:00
Daniel Gerhardt 7825001586 Fix file upload dialog for comment editing
This fixes the file upload dialog which currently works for new comments
but not for comment editing. The cause for this is a missing DOM class
which causes traversal to the dropzone to fail.

This is fixed by adding the expected `gfm-form` class to the edit form.
It has to be added dynamically since adding it to the form template
would break the form's layout and comment saving.
2015-07-17 21:15:52 +02:00
Stan Hu a84ed6eb23 Merge branch 'add-support-remove-milestone' into 'master'
Add support for destroying project milestones

### What does this MR do?

This MR adds a "Remove" button to the project milestones page and the milestone page itself.

### Why was this MR needed?

Because lots of people talked about needing to clean their toilets. :)

### What are the relevant issue numbers?

Closes https://github.com/gitlabhq/gitlabhq/issues/1504

### Screenshots

![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/ef8c7a3ea1db7b37cccae3869ac4de0a/image.png)

![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/33eb01c7bc30fb235de96db5efb8746d/image.png)

See merge request !980
2015-07-17 17:15:27 +00:00
Dmitriy Zaporozhets c413a5507d Merge branch 'validate_token_and_url_format_for_gitlab_ci' into 'master'
Validate format of project_url and token for GitLab CI service.

If `project_url` and `token` for are invalid, [service_hook creation](https://gitlab.com/gitlab-org/gitlab-ce/blob/7-13-stable/app/models/project_services/gitlab_ci_service.rb#L30-34) will silently fail due to validation of URL in `WebHook`.

Given that token is a sequence of numbers and letters for GitLab CI making sure that there are no unexpected characters should be enough to prevent service_hook being nil. 

Fixes #1997 

See merge request !987
2015-07-17 16:25:03 +00:00
Dmitriy Zaporozhets 67fb9ef266 Merge branch 'even-faster-search' into 'master'
Avoid copy of strings in memory for parsing git grep result

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

See merge request !967
2015-07-17 16:22:45 +00:00
Dmitriy Zaporozhets 53d9f78043 Update changelog
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-17 18:21:47 +02:00
Marin Jankovski 77f325a49f Do not disappoint rubocop. 2015-07-17 17:17:33 +02:00
Dmitriy Zaporozhets 26f4948264 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-07-17 17:06:24 +02:00
Dmitriy Zaporozhets 915f985550 Merge branch 'advanced-cache' into 'master'
Advanced cache

Fixes #1993

* Build missing cache values in background job after each push
* Store commit_count in project table. Refresh in background job
* moved repository size calculation in background job


## Advantages

Every time push is triggered - we build cache for project even without user visiting project page. 
That means first visit is as fast as others now. This is especially good for active projects where people have some requests fast because of cache and some slow - because cache was build in their request. 

Between cache expired and cache built we we had gap when Linux repo can give 502 error because calculation commits count takes 30 seconds or even more. 
Using value from database fix this problem. Before cache is updated you see old value from database. After - you see new one. 

Basically this merge request is super win to GitLab. We don't do some heavy operations in user request but instead in background job. 

## Temporary problem

After this migration all projects will have `0` commits in database. It fill be replaced with real value on next push. I did not add recalculation to migration because it will last forever on big instances.  Can be fixed by adding rake task which will go in background on live instance without downtime

See merge request !986
2015-07-17 15:04:49 +00:00
Marin Jankovski c7daa5f17f Add specs for gitlab ci service validity. 2015-07-17 17:03:15 +02:00
Valery Sizov bb09c202bd Merge branch 'release-manager-owns-stable' into 'master'
The release manager owns the stable branches

I think this helps the release manager because it means they don't
have to worry about others pushing commits at the last minute.

See merge request !1907
2015-07-17 14:56:48 +00:00
Dmitriy Zaporozhets 2f061c1e2a Merge branch 'cache-two-weeks' into 'master'
Expire Rails cache entries after two weeks

This should help prevent endless Redis growth.

See merge request !1903
2015-07-17 14:47:59 +00:00
Stan Hu 5bac64552d Fix bug where clicking on the link icon on a file would result in "L#undefined" in the URL
Closes #2002
2015-07-17 07:32:17 -07:00
Jacob Vosmaer 559c363b1e The release manager owns the stable branches
I think this helps the release manager because it means they don't
have to worry about others pushing commits at the last minute.
2015-07-17 16:32:06 +02:00
Dmitriy Zaporozhets 67654a44d1 Avoid cache building for super-weird case when repository root_ref is nil
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-17 16:03:38 +02:00
Marin Jankovski 302c52551a Fix failing specs after adding format verification for token and project url in gitlab ci service. 2015-07-17 15:58:26 +02:00
Stan Hu df2bb60f90 Add support for destroying project milestones
Closes https://github.com/gitlabhq/gitlabhq/issues/1504
2015-07-17 06:54:32 -07:00
Marin Jankovski c3e35917fb Validate format of project_url and token for GitLab CI service. 2015-07-17 15:26:09 +02:00
Dmitriy Zaporozhets f0116f1335 Store commit count in project table
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-17 15:22:56 +02:00
Dmitriy Zaporozhets 67ca5a53f6 Build missing cache items in background job after each push
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-17 14:50:03 +02:00
Dmitriy Zaporozhets 881fbe5070 Add more seed projects. Control amount with SIZE env variable
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-07-17 13:59:40 +02:00
Dmitriy Zaporozhets c4c41007ad Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-07-17 12:19:39 +02:00
Sytse Sijbrandij 95400db9c8 Clean up editions paragraph 2015-07-17 09:56:34 +00:00
Sytse Sijbrandij 5d168588c0 Update installation instructions. 2015-07-17 09:52:41 +00:00
Sytse Sijbrandij 2590b16cb4 Improve the layout of the readme. 2015-07-17 09:50:37 +00:00
Stan Hu 6c9f527b3f Return comments in created order in merge request API
Closes #1832
2015-07-16 22:33:58 -07:00
Job van der Voort a98ca3e815 Merge branch 'chef-docker' into 'master'
Added note about chef

Added note about chef being required to generate GitLab config. because of tweet https://twitter.com/grahamgilbert/status/621015318442459136

See merge request !982
2015-07-16 20:19:51 +00:00
Job van der Voort b351e6f50c Merge branch 'create-branch' into 'master'
Added new doc about creating a new branch

Added new document about creating a branch and fixed bullets in all the other documents. Also fixed "git push REMOTE BRANCH".

See merge request !1894
2015-07-16 18:36:12 +00:00