Commit Graph

209 Commits

Author SHA1 Message Date
Rubén Dávila b8295fc323 Fix build and add specs 2016-02-19 13:14:53 -05:00
Robert Speicher ae13389b0b Provide explicit html format when rendering git_not_found page
Prior, if the request format was, for example, .zip, we'd get an
`ActionView::MissingTemplate` error.
2016-02-15 16:38:27 -05:00
Robert Speicher 012c75d1b0 Properly render the `errors/git_not_found` page 2016-02-15 15:52:39 -05:00
Josh Frye 2ad094132d Various filter fixes 2016-02-04 13:03:41 -05:00
Josh Frye 7522ac0b3c Paginate + ajax filter dashboard projects 2016-02-04 11:40:19 -05:00
Stan Hu 7aa739ddc7 Support download access by PRIVATE-TOKEN header
Currently there is no way to download a raw file without embedding
the token in the URL, which exposes the token in the URL. There
should be an way of sending this information via the header as the
API does.

Closes https://github.com/gitlabhq/gitlabhq/issues/8137
2016-02-03 15:42:24 +01:00
Rubén Dávila c3c92c7317 Make default sorting preference work for Issues and MRs. 2016-01-22 18:43:21 -05:00
Rubén Dávila 9ef468922c Merge branch 'master' into issue_5546 2016-01-22 17:54:37 -05:00
Rubén Dávila 7c520c7803 Make sorting preference reusable for all projects. 2016-01-22 17:00:35 -05:00
Rubén Dávila eccaa099d1 Make cookie suffix more simpler. 2016-01-21 15:06:07 -05:00
Rubén Dávila 0f79620ccb Little refactor plus some specs. 2016-01-21 12:54:10 -05:00
Rubén Dávila 4d345bc400 Remember last sort option used. 2016-01-20 17:29:53 -05:00
Douwe Maan 7d347ae564 Merge branch 'master' into issue_3945 2016-01-20 20:04:15 +01:00
Douwe Maan 0ad6b44a27 Send user context to Sentry 2016-01-20 16:15:19 +01:00
Douwe Maan c23ca0b0b5 Merge branch 'master' into issue_3945 2016-01-20 14:53:41 +01:00
Rubén Dávila c8db25c37c Merge branch 'master' into issue_3945 2016-01-14 17:28:44 -05:00
Rubén Dávila df8776f480 Consider that URL can end with '/' before redirecting. #7975 2016-01-13 17:03:24 -05:00
Rubén Dávila 21b602c60a Change strategy to highlight diffs. #3945
Now we apply syntax highlighting to the whole old and new files.
This basically help us to highlight adequately multiline content.
2016-01-07 22:37:01 -05:00
Yorick Peterse 9dacc3bc56 Sort by ID when sorting using "Recently created"
Sorting by "id" has the same effect as sorting by created_at while
performing far better and without the need of an extra index (in case
one wanted to speed up sorting by "created_at").

Sorting by "Recently updated" still uses the physical "updated_at"
column as there's no way to use the "id" column for this instead.
2016-01-07 14:53:02 +01:00
Gabriel Mazetto 1249289f89 Fixed codestyle and added 2FA documentation 2015-12-24 19:01:30 -02:00
Gabriel Mazetto b61a5bc20c specs for forced two-factor authentication and grace period
simplified code and fixed stuffs
2015-12-24 19:01:30 -02:00
Gabriel Mazetto 31fb2b7702 Grace period support for TFA 2015-12-24 19:01:30 -02:00
Gabriel Mazetto 33964469b3 WIP require two factor authentication 2015-12-24 19:00:18 -02:00
tduehr 8e3f1fa629 add CAS authentication support 2015-12-14 21:43:41 -06:00
Jeroen van Baarsen 2dec5ec990 Only redirect to homepage url when its not the root url
It was possible to create an infi redirect when the user set up the
`home_page_url` to redirect to the main URL of the gitlab instance.

This fix makes sure this redirect is not possible.

Fixes !1020

Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-11-02 15:42:30 +01:00
Robert Speicher 7924dd5c9f Merge branch 'project-path-case-sensitivity' into 'master'
Prefer project with exact path to differently cased one when both exist.

Fixes #3113.

See merge request !1649
2015-10-22 13:03:04 +00:00
Douwe Maan e17e5a5ce4 Move case sensitivity check to find_with_namespace. 2015-10-21 10:09:32 +02:00
Stan Hu 9bfc531ec6 Redirect to a default path if HTTP_REFERER is not set
Safari 9.0 does not yet honor the HTML5 `origin-when-cross-origin` mode,
and it's possible load balancers/proxies strip the HTTP_REFERER from
the request header. In these cases, default to some default path.

Closes #3122

Closes https://github.com/gitlabhq/gitlabhq/issues/9731
2015-10-20 07:45:48 -07:00
Douwe Maan 2f7fc7e9f7 Prefer project with exact path to differently cased one when both exist. 2015-10-20 16:16:08 +02:00
Douwe Maan c993481d99 Merge branch 'master' into git-archive-golang 2015-10-15 11:47:36 +02:00
Jacob Vosmaer a74915a4ad Always return HTML in git_not_found
This allows us to give a nice 404 for e.g. archive.zip.
2015-10-14 15:22:03 +02:00
Valery Sizov 8346dde052 Only render 404 page from /public 2015-10-13 20:12:34 +03:00
Francesco Levorato 1bbcc29687 Redirect case sensitive project path to the normalized one 2015-09-18 16:37:21 +02:00
Dmitriy Zaporozhets 0b5d627cd4 Merge branch 'master' into ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g 2015-09-09 14:56:02 +02:00
Dmitriy Zaporozhets 90c338a495 Move helpers back to original directory 2015-09-09 14:37:34 +02:00
Jared Szechy e156f42079 FogBugz project import 2015-09-08 20:23:01 -04:00
Douwe Maan 30555c1d24 Merge branch 'rs-remove-user-color-scheme-class' into 'master'
Apply syntax highlighting to fenced code blocks client-side

Instead of applying the syntax highlighting scheme class to these blocks
server-side, we use Javascript and Gon to apply the user's color scheme
(or the default) client-side.

This will make it easier to cache these blocks in the future because
they're no longer state-dependent.

See merge request !1203
2015-08-27 16:24:51 +00:00
Douwe Maan 843694f902 Merge branch 'master' into ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g 2015-08-26 17:53:31 -07:00
Stan Hu c1fe98e0b9 Prevent too many redirects error when home page URL set to external_urll
Many users naively set the home page URL setting to external_url
(e.g. https://mydomain.com). When an unauthenticated user signs in, this
causes endless redirections. For example, this is occuring:

1. Unauthenticated user attempts to access https://mydomain.com/dashboard
2. Application redirects to the home page URL: https://mydomain.com
3. Repeat step 2

In step 3, ApplicationController should have redirected the user to
https://mydomain.com/users/sign_in. Disabling the redirection if home
page URL is the same as external_url prevents users from messing up.

Closes https://github.com/gitlabhq/gitlabhq/issues/8843
Closes #2057
2015-08-26 07:38:33 -07:00
Douwe Maan 046b283127 Groundwork for merging CI into CE 2015-08-25 18:42:46 -07:00
Robert Speicher 2c3e42e4a4 Remove user_color_scheme_class
Instead of rendering this value server-side, we use Javascript and Gon
to apply the user's color scheme (or the default) to any syntax
highlighted code blocks.

This will make it easier to cache these blocks in the future because
they're no longer state-dependent.
2015-08-25 15:32:38 -07:00
Artem Sidorenko e238a8dad5 Import sources: show only enabled sources 2015-08-20 12:13:22 +02:00
Douwe Maan 70a3c165a9 Allow custom label to be set for authentication providers. 2015-07-23 15:20:12 +02:00
Stan Hu f4f216db67 Only enable HSTS header for HTTPS and port 443
Closes https://github.com/gitlabhq/gitlabhq/issues/9449
2015-07-12 21:37:10 -07:00
Robert Speicher 335749d754 Ensure `@sort` is set by set_filters_params
Closes #1750
2015-07-08 18:17:13 -04:00
Daniel Gerhardt bee3979a4a Fix redirection to home page URL for unauthorized users
Redirection to the home page URL was broken by changing the target for
`root_url` from `DashboardController` to `RootController` in
94d3c1433d. This regression was introduced
in the 7.12.0 release.

Fixes #1916.
2015-07-03 00:22:20 +02:00
Stan Hu 07efb17e10 Fix 403 Access Denied error messages when accessing Labels section in a project that has MRs disabled but issues enabled
Closes #1813
2015-06-18 03:15:05 -07:00
Alex Lossent 60225a067d Allow to configure a URL to show after sign out 2015-05-29 18:20:15 +02:00
Douwe Maan 45e4727f97 Set milestone on new issue when creating issue from index with milestone filter active. 2015-05-27 14:22:11 +02:00
Robert Speicher e512f770cd Fix Devise parameter sanitizer for otp_attempt 2015-05-09 17:31:40 -04:00