Commit Graph
470 Commits
Author SHA1 Message Date
Stan Hu ee92dd1683 Unescape branch names in compare commit
Closes #1399
Closes https://github.com/gitlabhq/gitlabhq/issues/9105
2015-04-30 12:44:46 -07:00
Douwe Maan 26ad250989 Add a page title to every page. 2015-04-30 19:12:15 +02:00
Douwe Maan 7e0eb486ed Don't allow a merge request to be merged when its title starts with "WIP". 2015-04-30 15:46:36 +02:00
Chulki Lee 57c724558d Add api version property on hipchat service 2015-04-27 21:14:04 +09:00
Dominik Sander 3c3b43b0a0 Add notify and color options to HipchatService
When notify is set to true send messages will trigger a notification for
all room members.
Color changes the background color of the message.
2015-04-26 22:00:51 +02:00
Douwe Maan 439b9f50af Merge branch 'fix-slack-channel-in-admin-settings' into 'master'
Fix bug where Slack service channel was not saved in admin template settings

Consolidate allowed parameters in one place to avoid these kinds of bugs in the future.

Closes https://github.com/gitlabhq/gitlabhq/issues/9181
Closes #1501

See merge request !574
2015-04-24 16:32:09 +00:00
Robert Speicher ea9089647c Merge branch 'rs-simplify-uploads-controller' into 'master'
Simplify the `skip_before_action` logic for UploadsController

See merge request !547
2015-04-24 16:26:32 +00:00
Stan Hu 2f04599751 Fix bug where Slack service channel was not saved in admin template settings.
Consolidate allowed parameters in one place to avoid these kinds of bugs in the future.

Closes https://github.com/gitlabhq/gitlabhq/issues/9181
2015-04-24 08:33:24 -07:00
Douwe Maan 27af24c1c9 No longer needed to pass project argument to commit methods. 2015-04-24 12:29:36 +02:00
Douwe Maan 8ed7ac9d44 Use project.commit convenience method. 2015-04-24 12:29:36 +02:00
Robert Speicher 10053b173d Simplify the skip_before_filter logic for UploadsController 2015-04-23 13:15:47 -04:00
Jeroen van Baarsen 5a4ebfb47a Fixed the Rails/ActionFilter cop
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-04-20 15:39:37 +02:00
Dmitriy Zaporozhets a4006a6b48 Merge branch 'better-commit-mentions' into 'master'
Clean up code around commit mentions.

Builds upon !527.

See merge request !528
2015-04-20 12:42:31 +00:00
Douwe Maan 779f05ef0e Explain skip_before_filter workaround. 2015-04-17 12:49:20 +02:00
Douwe Maan 305725f8d5 Correctly handle blocked users. 2015-04-17 11:33:53 +02:00
Hannes Rosenögger 7bba2a19ab remove access control for images
This commit removes the access control for uploaded images.
This is needed to display the images in emails again.
2015-04-16 12:37:19 +02:00
Douwe Maan 959ebbcade Clean up code around commit mentions. 2015-04-15 17:57:31 +02:00
Douwe Maan cb5362e7ce Follow newline guidelines. 2015-04-14 15:16:00 +02:00
Douwe Maan 0013ea5130 Remove duplication between Group and ProjectMember. 2015-04-14 12:41:19 +02:00
Douwe Maan 1b5c483d89 Consistently use "invitation" rather than "invite" in text. 2015-04-14 12:25:16 +02:00
Douwe Maan 453340d449 Let membership invitations be resent. 2015-04-14 12:08:10 +02:00
Douwe Maan 87dd3f215f Let members be invited from Add members pane. 2015-04-14 12:08:10 +02:00
Douwe Maan 90dafe31c4 Only show invited users to people who can admin group. 2015-04-14 12:07:33 +02:00
Douwe Maan cee98f2247 Reference project members by id instead of user_id. 2015-04-14 12:06:43 +02:00
Douwe Maan 2b2bd402dc Track who created a group or project member. 2015-04-14 12:06:42 +02:00
Dmitriy Zaporozhets 9c14ed0689 Merge branch 'public-deploy-keys' into 'master'
Allow admin to create public deploy keys that are accessible to any project.

Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/1774.

Project settings:

![Screen_Shot_2015-03-27_at_14.46.48](https://gitlab.com/gitlab-org/gitlab-ce/uploads/01799ff912671ba6db3f828ea1aca1a6/Screen_Shot_2015-03-27_at_14.46.48.png)

The "Public deploy keys" section is only shown when there are any. If there are public deploy keys but no project deploy keys, only public deploy keys are shown. If there are no public deploy keys and no project deploy keys, the current "Deploy keys from projects you have access to will be displayed here" placeholder is shown.

The list of projects below the public key has been changed to only show projects the user has access to.

"Public deploy key" seems to be repeated on the left, but the first is just the title. The label is always visible for public deploy keys.

Admin index:

![Screen_Shot_2015-03-27_at_14.47.06](https://gitlab.com/gitlab-org/gitlab-ce/uploads/ea889d274cfd3f0694d47d602f4f3e94/Screen_Shot_2015-03-27_at_14.47.06.png)

Admin detail page:

![Screen_Shot_2015-03-27_at_14.47.16](https://gitlab.com/gitlab-org/gitlab-ce/uploads/8c8475e05bf6b497da3b9f1bc102329f/Screen_Shot_2015-03-27_at_14.47.16.png)

Projects using the deploy key are listed on the left and can be disabled easily.

See merge request !469
2015-04-13 09:08:13 +00:00
Douwe Maan f3f856029b Merge branch 'fix-slashes-in-wiki-urls' into 'master'
Fix bug where Wiki pages that include a '/' were no longer accessible

### What does this MR do?

This MR fixes a regression that caused Wiki pages that included a '/' to no longer be accessible.

### Are there points in the code the reviewer needs to double check?

Are there cases that `wiki_helper.rb` doesn't handle?

### Why was this MR needed?

The upgrade from Rails v4.1.2 to v4.1.9 (76aad9b76e) caused slashes in a model ID to be escaped automatically. We can no longer use the built-in the URL helpers to generate the links for Wiki pages if we want to maintain support for slashes. There is no option to tell the formatter otherwise:

http://stackoverflow.com/questions/25031791/rails-4-1-2-to-param-escapes-slashes-and-breaks-app

The Rails code in question is here:

https://github.com/rails/rails/blob/4-1-stable/actionpack/lib/action_dispatch/journey/visitors.rb#L159

### What are the relevant issue numbers / [Feature requests](http://feedback.gitlab.com/)?

#1363

See merge request !502
2015-04-08 16:30:23 +00:00
Stan Hu 3143edfea6 Fix bug where Wiki pages that include a '/' were no longer accessible
Closes #1363
2015-04-07 09:10:11 -07:00
Robert Speicher 167a6b9eef Render a 404 when RefsController#logs_tree gets an HTML request
Fixes #2152
2015-04-06 23:08:28 -04:00
Douwe Maan ed097df627 Clean up code. 2015-04-03 12:28:47 +02:00
Douwe Maan edc4a56d26 Allow admin to create public deploy keys that are accessible to any project. 2015-04-03 12:23:20 +02:00
Douwe Maan 91761b0685 Add tests. 2015-03-31 13:37:21 +02:00
Douwe Maan 2cfd0b59ae Archive repositories in background worker. 2015-03-31 12:52:20 +02:00
Douwe Maan 4830b2be5e Refactor GitAccess to use instance variables. 2015-03-24 14:11:48 +01:00
Valery Sizov e5fe14b2fb Link to CI with ref 2015-03-20 19:19:29 +02:00
Dmitriy Zaporozhets 52acd2b45c Merge branch 'external_wiki' into 'master'
Add support for external wikis

## What does this MR do?
This MR adds the possibility to replace the link to the internal wiki of gitlab with a custom link.
Currently this is realised as a service.

## What Use Case does this MR solve?
In my Company we already have a wiki System (Confluence).
We have a policy to use the existing wiki, so we can't switch to the internal wiki Gitlab provides.
This currently only leaves us two choices:
1. Disable the gitlab wiki. That means we completly loose the connection between wiki and code from the gitlab ui.
2. Create a simple wiki page with a link to our external wiki and hope that no one uses the internal one.

Both solutions are not really good.
So what can be done to improve the situation while making it as easy as possible for new developers to access both, wiki and gitlab?
Replacing the wiki link kinda like the JIRA integration replaces the issues link looks like a good first step to me. :)
This can probably be extended later to completly prevent access to the internal wiki (currently that's still possible if you know the link) or maybe to check if the link really points to a wiki.

## Screenshot:
![external_wiki_service](https://gitlab.com/uploads/gitlab-org/gitlab-ce/89b27cf068/external_wiki_service.png)

See merge request !291
2015-03-18 02:00:36 +00:00
Dmitriy Zaporozhets bfc8ded120 Merge branch 'last-deploy-key' into 'master'
Delete deploy key when last connection to a project is destroyed.

Addresses #1959.

See merge request !1710
2015-03-17 16:49:38 +00:00
Dmitriy Zaporozhets 9162e34bb0 Merge branch 'issue_subscription' into 'master'
Subscription to issue/mr

Fixes #1911 and #1909

![joxi_screenshot_1426601822159](https://dev.gitlab.org/gitlab/gitlabhq/uploads/53021bc5783271322ab2dfba7598eaa3/joxi_screenshot_1426601822159.png)

![joxi_screenshot_1426601836423](https://dev.gitlab.org/gitlab/gitlabhq/uploads/244ff360fbd6f30980f8dad699400814/joxi_screenshot_1426601836423.png)

See merge request !1702
2015-03-17 16:45:04 +00:00
Douwe Maan 7d2b34bd61 Satisfy Rubocop. 2015-03-17 16:00:32 +01:00
Douwe Maan 9c7fffb655 Delete deploy key when last connection to a project is destroyed. 2015-03-17 14:55:43 +01:00
Valery Sizov 1b437ec349 tests 2015-03-16 21:38:41 +02:00
Dmitriy Zaporozhets 648f38cd98 Merge branch 'fix-restricted-visibility' into 'master'
Restricted visibility levels - bug fix and new feature

This allows admin users to override restricted visibility settings when creating and updating projects and snippets, and moves the restricted visibility configuration from gitlab.yml to the web UI.  See #1903.

## Move configuration location

I added a new section to the application settings page for restricted visibility levels.  Each level has a checkbox, styled with Bootstrap to look like a toggle button.  A checked box means that the level is restricted.  I added a glowing text shadow and changed the background color for checked buttons because the default styles made it hard to distinguish between checked and unchecked.  This image shows the new section with the "Public" box checked:

![restricted_visibility_settings](https://dev.gitlab.org/Okada/gitlabhq/uploads/629562e4313f89b795e81c3bb0f95893/restricted_visibility_settings.png)

## Allow admins to override

To allow admin users to override the restricted visibility levels, I had to remove the `visibility_level` validation from the `Project` class.  The model doesn't know about the `current_user`, which should determine whether the restrictions can be overridden.  We could use the creator in the validation, but that wouldn't work correctly for projects where a non-admin user is the creator and an admin tries to change the project to a restricted visibility level.

The `Project::UpdateService` and `Project::CreateService` classes already had code to determine whether the current user is allowed to use a given visibility level; now all visibility level validation is done in those classes.  Currently, when a non-admin tries to create or update a project using a restricted level, these classes silently set the visibility level to the global default (create) or the project's existing value (update).  I changed this behavior to be more like an Active Model validation, where using a restricted level causes the entire request to be rejected.

Project and personal snippets didn't have service classes, and restricted visibility levels weren't being enforced in the model or the controllers.  The UI disabled radio buttons for restricted levels, but that wouldn't be difficult to circumvent.  I created the `CreateSnippetService` and `UpdateSnippetService` classes to do the same restricted visibility check that the project classes do.  And since I was dealing with snippet visibility levels, I updated the API endpoints for project snippets to allow users to set and update the visibility level.

## TODO

* [x] Add more tests for restricted visibility functionality

cc @sytse @dzaporozhets

See merge request !1655
2015-03-16 17:49:46 +00:00
Valery Sizov 410d25c8ca rename table subscribe; make it polymorfic 2015-03-16 15:22:50 +02:00
Valery Sizov 9698b36c1c Subscription 2015-03-15 19:44:59 +02:00
Douwe Maan 31fc73f0a9 Use project_member instead of team_member. 2015-03-15 13:50:38 +01:00
Vinnie Okada ad0ca0499a Merge branch 'master' into fix-restricted-visibility
Conflicts:
	db/schema.rb
2015-03-14 10:49:11 -06:00
Dmitriy Zaporozhets 309f588d56 Merge branch 'fix-encoding' into 'master'
Minor cleanup around UTF-8 encoding.

Minor cleanup to be merged after https://dev.gitlab.org/gitlab/gitlab_git/merge_requests/24 is merged in.

See merge request !1642
2015-03-13 16:50:53 +00:00
Douwe Maan 12b779e70b Move tag deletion to service and execute hooks and services. 2015-03-13 16:07:08 +01:00
Douwe Maan 7f4cffd88b Reuse blob object fetched by Gitlab::Git::Blame. 2015-03-13 13:49:27 +01:00
Douwe Maan f96dc6295a Everything from gitlab_git is already UTF-8. 2015-03-13 13:49:27 +01:00