Commit Graph
1143 Commits
Author SHA1 Message Date
Hannes Rosenögger 9e5738b007 Extend the commit calendar to show the actual commits for a date 2015-03-18 08:42:42 +01: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
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 9698b36c1c Subscription 2015-03-15 19:44:59 +02:00
Douwe Maan 84371de01f Move group leave action from dashboard/groups to groups/group_members. 2015-03-15 13:52:28 +01:00
Douwe Maan 224187ffb9 Move group members index from /members to /group_members. 2015-03-15 13:51:11 +01:00
Douwe Maan 75aff0f79c Move project members index from /team to /project_members 2015-03-15 13:51:11 +01: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
Marin Jankovski 141168ad3c Change default number of unicorn workers to three. 2015-03-13 17:14:34 -07:00
Dmitriy Zaporozhets f29a7ce51f Merge branch 'markdown-smb-link' into 'master'
Allow smb:// links in Markdown text.

As requested by Sam McLeod at https://gitlab.com/gitlab-org/gitlab-ce/issues/1184

See merge request !1669
2015-03-12 03:57:52 +00:00
Dmitriy Zaporozhets b2f6567961 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-03-11 09:57:59 -07:00
Vyacheslav Slinko 61ed518781 Make email display name configurable 2015-03-11 11:04:23 +07:00
Dmitriy Zaporozhets 0414b2ae98 Remove projects page from dashboard 2015-03-10 16:03:37 -07:00
Douwe Maan ca9aca9279 Allow smb:// links in Markdown text. 2015-03-10 13:32:28 +01:00
Dmitriy Zaporozhets d36ee3190a Add starred projects page to dashboard 2015-03-09 14:12:03 -07:00
Dmitriy Zaporozhets 7e574a896b Merge branch 'dashboard-groups' into 'master'
Move profile groups page to dashboard

For #2069

See merge request !1654
2015-03-09 16:43:36 +00:00
Marin Jankovski 41913fcc09 Merge branch 'smtp_example_update' into 'master'
Add link to smtp documentation.

Closes #2070

See merge request !1627
2015-03-09 16:23:43 +00:00
Dmitriy Zaporozhets 9b3e156e43 Move profile groups page to dashboard 2015-03-08 17:03:30 -07:00
Dmitriy Zaporozhets b5c3e1a431 Add GitLab UI development kit 2015-03-08 14:46:22 -07:00
Vinnie Okada cacac147de Move restricted visibility settings to the UI
Add checkboxes to the application settings page for restricted
visibility levels, and remove those settings from gitlab.yml.
2015-03-07 13:11:08 -07: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
Marin Jankovski 890f14786a Add link to smtp documentation. 2015-03-04 09:04:23 -08:00
Douwe Maan fbc3cb69c3 Add dashboard milestones. 2015-03-03 16:19:37 +01:00
Dmitriy Zaporozhets eb865c43d0 Merge pull request #8349 from divineforest/cleanup-assets-compress
Remove useless `assets.compress` option, Rails 4 uses only `assets.js_co...
2015-03-02 15:23:57 -08:00
Douwe Maan ff69685607 Add comment about note attachment redirect. 2015-02-28 17:02:57 +01:00
Douwe Maan 7202db072f Redirect old note attachment path to new uploads path. 2015-02-27 11:26:47 +01:00
Dmitriy Zaporozhets 0d884ff2b1 Merge branch 'extend_markdown_upload' into 'master'
Generalizes image upload in drag and drop in markdown to all files

From https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/265 by Hannes Rosenögger.

- [x] Rebase on master when !1553 is merged in

See merge request !1530
2015-02-25 23:36:03 +00:00
Douwe Maan 16c767814a Re-enable rescuing from Bitbucket OAuth errors. 2015-02-24 15:07:25 +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
Douwe Maan 0283fff591 Merge branch 'master' into extend_markdown_upload
# Conflicts:
#	app/views/projects/issues/_form.html.haml
#	app/views/projects/merge_requests/_form.html.haml
#	app/views/projects/merge_requests/_new_submit.html.haml
#	app/views/projects/milestones/_form.html.haml
#	app/views/projects/notes/_form.html.haml
#	app/views/projects/wikis/_form.html.haml
#	config/routes.rb
#	spec/controllers/projects_controller_spec.rb
2015-02-24 14:54:39 +01:00
Dmitriy Zaporozhets 9f9a79abe0 Merge pull request #8782 from jvanbaarsen/no-test-class-caching
Don't cache classes in tests
2015-02-23 23:47:23 -08:00
Marin Jankovski b0dfe434c6 Using gitlab url to build links for gitlab issue tracker and add a spec. Fix rubocop warnings in path. 2015-02-23 18:43:26 -08:00
Dmitriy Zaporozhets b821a1bd41 Fix markdown image uploader after rails update 2015-02-23 16:29:32 -08:00
Dmitriy Zaporozhets c6860a5828 Fix style issue for rubocop 2015-02-23 15:18:45 -08: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
Douwe Maan 452ba19cdd Change check to only swap static middleware when it's enabled. 2015-02-21 15:09:17 +01:00
Douwe Maan aba1251594 Merge branch 'master' into extend_markdown_upload 2015-02-21 13:46:58 +01: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
Douwe Maan 6945f4a299 Explain Gitlab::Middleware::Static. 2015-02-20 23:30:06 +01:00
Marcin Kulik 157b4b4b1f Add gitorious.org importer 2015-02-20 17:42:58 +00:00
Douwe Maan 2570e4df79 Fix specs. 2015-02-20 16:55:38 +01:00
Douwe Maan 938a1381fc Satisfy Rubocop. 2015-02-20 16:04:03 +01:00
Douwe Maan 7f1adc3d9c Fix URL to uploaded file. 2015-02-20 16:01:37 +01:00
Douwe Maan 218283b368 Merge branch 'extend_markdown_upload' into generic-uploads
# Conflicts:
#	app/controllers/files_controller.rb
#	app/controllers/projects/uploads_controller.rb
#	app/uploaders/attachment_uploader.rb
2015-02-20 15:37:37 +01:00
Douwe Maan c801df81fb Satisfy Rubocop. 2015-02-20 14:39:35 +01:00