Commit Graph
763 Commits
Author SHA1 Message Date
Dmitriy Zaporozhets afb694886e Merge branch 'ldap-unblock-user' into 'master'
Unblock user if they were unblocked in AD.

Fixes problem with !1687.

See merge request !1694
2015-03-13 22:25:47 +00:00
Douwe Maan 8fed435208 Unblock user if they were unblocked in AD. 2015-03-13 22:34:11 +01:00
Dmitriy Zaporozhets b8f5e23f27 Merge branch 'tag-branch-hooks' into 'master'
Execute hooks and services when branch or tag is created or deleted through web interface.

Fixes #2095.

Split up into commits to make it easier to see why what was changed :)

See merge request !1692
2015-03-13 16:42:01 +00:00
Douwe Maan 4e49f21b14 Set push data object kind in PushDataBuilder. 2015-03-13 14:51:48 +01:00
Douwe Maan 2718955441 Fix import pages not working after first load. 2015-03-13 13:47:26 +01:00
Dmitriy Zaporozhets e7f4f0ae1d Block user if he/she was blocked in Active Directory 2015-03-12 11:53:21 -07:00
Dmitriy Zaporozhets 158507d942 Add blue theme to GitLab 2015-03-11 21:29:11 -07:00
Dmitriy Zaporozhets b2f6567961 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-03-11 09:57:59 -07:00
Dmitriy Zaporozhets e349ca1353 Merge branch 'ldap-filter-eq' into 'master'
Escape wildcards when searching LDAP by username.

Addresses https://dev.gitlab.org/gitlab/gitlabhq/issues/2086.

Also see https://dev.gitlab.org/gitlab/gitlab-ee/merge_requests/344 and https://dev.gitlab.org/gitlab/omniauth-ldap/merge_requests/2.

See merge request !1644
2015-03-11 16:57:28 +00:00
Hannes Rosenögger b0c1bc6657 Merge branch 'generate-valid-json' into 'master'
Generate valid json

This patch helps to be compatible to other programing languages as it improves the validation of hook data. It seems only ruby can handle 'nil' as value while other json decode function will fatal.

See merge request !182
2015-03-11 16:53:10 +00:00
Douwe Maan 383c56efa1 Use Gitlab::Git helper methods and constants as much as possible. 2015-03-10 13:39:31 +01:00
Nicole Cordes b7a31a4b02 Generate valid json for hooks
It seems that ruby can handle 'nil' value but other json processors
(like PHP) throw an error. This is always generated for empty arrays.
2015-03-10 10:07:25 +01:00
Douwe Maan 4dddaef866 Automatically link commit ranges to compare page. 2015-03-07 00:46:13 +01:00
Stan Hu 7e204cf389 Added comment notification events to HipChat and Slack services.
Supports four different event types all bundled under the "note" event type:

- comments on a commit
- comments on an issue
- comments on a merge request
- comments on a code snippet
2015-03-06 06:54:00 -08:00
Douwe Maan 757dca2b78 Escape wildcards when searching LDAP by username. 2015-03-06 13:39:57 +01:00
Dmitriy Zaporozhets d07b2e09fe Merge branch 'timeout' into 'master'
Increase timeout for Git-over-HTTP requests.

Fixes #2081 and https://gitlab.com/gitlab-org/gitlab-ce/issues/232.

Normal web requests are bound by the `Rack::Timeout` timeout of 60 seconds, while Grack Git-over-HTTP requests are only bound by Unicorn's timeout which is now set to 1 hour, which should be plenty.

The omnibus package should be updated to no longer use `unicorn['worker_timeout']` for the Unicorn timeout, but to set the `Slowpoke.timeout`.

See merge request !1619
2015-03-05 02:28:58 +00:00
Douwe Maan 516bcabbf4 Increase timeout for Git-over-HTTP requests. 2015-03-04 23:20:47 +01:00
Dmitriy Zaporozhets 63178a9509 Merge branch 'add-more-slack-notifications' into 'master'
Add more Slack notifications for issue and merge request events

From https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/237 by Stan Hu.

See merge request !1556
2015-03-04 21:57:17 +00:00
Valery Sizov 3d9a766d9f Web Hook sends email of pusher 2015-03-04 20:29:25 +02:00
Marin Jankovski 3d6d0e1e77 Merge branch 'fix-namespace-merge-request-url' into 'master'
Fix namespace in merge request url building

Changes in 42387b733b now require namespace specification and broke abc69c8905.

There are additional helper functions in c530ca00b0, but this seemed easier not to rely on them.

See merge request !363
2015-03-04 01:08:52 +00:00
Stan Hu 2088cee935 Fix URL builder to use GitlabRoutingHelper 2015-03-03 15:57:28 -08:00
Dmitriy Zaporozhets 8c47a72a4e Merge branch 'project-existence-leak' into 'master'
Don't leak information about private project existence via Git-over-SSH/HTTP.

Fixes #2040 and https://gitlab.com/gitlab-org/gitlab-ce/issues/343.

Both `Grack::Auth` (used by Git-over-HTTP) and `Api::Internal /allowed` (used by gitlab-shell/Git-over-SSH) now return a generic "Not Found" error when the project exists but the user doesn't have access to it.

See merge request !1578
2015-03-03 20:05:12 +00:00
Jeroen van Baarsen abc69c8905 Merge branch 'fix-merge-request-url-builder' into 'master'
Fix merge request URL passed to Webhooks

If you look at the data structure passed to Webhooks, you will see:

`"url"=>nil`

I don't think any of the Webhooks or services are using this yet, so right now nothing so far depends upon this value being correct.

See merge request !352
2015-03-03 13:18:23 +00:00
Stan HuandDouwe Maan afe5d7d209 Issue #595: Support Slack notifications upon issue and merge request events
1) Adds a DB migration for all services to toggle on push, issue, and merge events.

2) Upon an issue or merge request event, fire service hooks.

3) Slack service supports custom messages for each of these events. Other services
not supported at the moment.

4) Label merge request hooks with their corresponding actions.
2015-03-03 11:14:31 +01:00
Douwe Maan dd37a10df4 Don't leak information about private project existence via Git-over-SSH/HTTP. 2015-03-02 17:52:48 +01:00
Nicolas Bouilleaud 8d0690c5c7 Support names starting with a digit or _ for projects and users
This is what’s actually allowed when creating a user or a project in gitlab.
2015-03-02 11:01:17 +01:00
Dmitriy Zaporozhets a52529f9b6 Merge branch 'bitbucket-import'
Conflicts:
	app/views/import/gitorious/status.html.haml
	db/schema.rb
2015-02-25 09:21:45 -08:00
Douwe Maan 3fde1dce1f Satisfy Rubocop. 2015-02-24 15:07:25 +01:00
Douwe Maan 6979b3afd5 Delete deploy key from Bitbucket after importing. 2015-02-24 15:07:24 +01:00
Douwe Maan f2b37de54b Fix specs. 2015-02-24 15:07:24 +01:00
Douwe Maan 448817c4de Load public key in initializer. 2015-02-24 15:07:24 +01:00
Douwe Maan ad6d623234 Add Bitbucket importer. 2015-02-24 15:07:24 +01:00
Valery Sizov 71a844cdae Web Editor: save to new branch 2015-02-24 11:43:20 +02:00
Stan Hu e363f2e675 Fix merge request URL passed to Webhooks.
Previously the symbol "url" in the object_attributes hash would always be nil.
2015-02-24 06:51:24 +00:00
Dmitriy Zaporozhets c87c1cb3b9 Merge branch 'api-empty-commit' into 'master'
Improve error messages when file editing fails

Give more specific errors in API responses and web UI flash messages when a file update fails.  See #1479.

Instead of returning false from `Gitlab::Satellite::Files::EditFileAction#commit!` when a `Grit::Git::CommandFailed` error is raised, now `#commit!` raises a different error depending on whether the failure happened during checkout, commit, or push.

@dzaporozhets Please let me know if you want to change the HTTP status codes or the error messages in `Files::UpdateService`

cc @sytse

See merge request !1569
2015-02-24 02:17:23 +00:00
Dmitriy Zaporozhets d723bf78b8 Fix git-over-http 2015-02-23 10:05:18 -08:00
Vinnie Okada 5f232b5687 Improve error messages when file editing fails
Give more specific errors in API responses and web UI flash messages
when a file update fails.
2015-02-22 16:01:49 -07:00
Vinnie Okada 2a9eed6620 Merge branch 'master' into rails-4.1.9
Conflicts:
	app/views/projects/commits/_commit.html.haml
	app/views/projects/issues/_issue.html.haml
	app/views/projects/issues/_issue_context.html.haml
	app/views/projects/merge_requests/_merge_request.html.haml
	app/views/projects/merge_requests/show/_context.html.haml
2015-02-21 12:55:28 -07:00
Dmitriy Zaporozhets a224a655d8 Merge branch 'mr-commit-comment-diff-lines' into 'master'
Fix commit comments on first line of diff not rendering in Merge Request Discussion view.

Example can be seen near the bottom on this MR: !1533.

Before:

![Screen Shot 2015-02-20 at 10.24.34](https://dev.gitlab.org/uploads/gitlab/gitlabhq/35600b98b5/Screen_Shot_2015-02-20_at_10.24.34.png)

After: the [note](https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/1533/diffs#note_36449) is actually rendered.

See merge request !1552
2015-02-21 02:06:39 +00:00
Marin Jankovski 8ae3112b3f Merge branch 'upload-xss-access-control' into 'master'
Fix note attachments XSS and access control

Replaces the reverted #1528, as proposed in https://gitlab.com/gitlab-org/omnibus-gitlab/issues/434, as discussed with @dzaporozhets and as summarized in #2032.

@marin Could you take a look at the nginx config and apply it to Omnibus once this gets merged?

See merge request !1553
2015-02-20 22:47:54 +00:00
Dmitriy Zaporozhets acc312fc25 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-02-20 13:54:21 -08:00
Dmitriy Zaporozhets 92434b29cc Extend project web hooks with more data
* add git_http_url and git_ssh_url to project web hook
* add visibility_level to project web hook
* add documentation about project visibility_level in API
2015-02-20 10:27:37 -08:00
Marcin Kulik 157b4b4b1f Add gitorious.org importer 2015-02-20 17:42:58 +00:00
Douwe Maan 938a1381fc Satisfy Rubocop. 2015-02-20 16:04:03 +01:00
Douwe Maan 4310431ee7 Use modified ActionDispatch::Static to let uploads go through to routes. 2015-02-20 12:44:07 +01:00
Douwe Maan 0632e85c82 Fix commit comments on first line of diff not rendering in Merge Request Discussion view. 2015-02-20 10:23:34 +01:00
Vinnie Okada 9e9ce95d62 Merge branch 'master' into rails-4.1.9
Conflicts:
	app/views/dashboard/_project.html.haml
	app/views/events/event/_common.html.haml
	app/views/explore/projects/_project.html.haml
	app/views/groups/_projects.html.haml
	app/views/projects/_home_panel.html.haml
	app/views/projects/_issues_nav.html.haml
	app/views/projects/issues/_discussion.html.haml
	app/views/projects/issues/_issues.html.haml
	app/views/projects/issues/show.html.haml
	app/views/projects/merge_requests/_discussion.html.haml
	app/views/projects/merge_requests/_show.html.haml
	app/views/projects/milestones/index.html.haml
	app/views/projects/notes/_edit_form.html.haml
	app/views/shared/_issuable_filter.html.haml
2015-02-19 20:53:05 -07:00
Dmitriy Zaporozhets 7ad5fd6ce7 Merge branch 'access-check-when-signed-out' into 'master'
Fix push access check when not signed in.

Was causing 500 on MR, Blob, Tree pages.

Fixes https://github.com/gitlabhq/gitlabhq/issues/8637 and https://github.com/gitlabhq/gitlabhq/issues/8813.

See merge request !1542
2015-02-18 23:24:06 +00:00
Douwe Maan 3d6b042e9e Fix push access check when not signed in. 2015-02-18 21:59:15 +01:00
Dmitriy Zaporozhets a8a328b151 DB performance improvements to GitLab 2015-02-18 00:16:42 -08:00