Commit Graph
1636 Commits
Author SHA1 Message Date
Dmitriy Zaporozhets c5d65ed62f Merge branch 'userpage-activity-scroll'
Conflicts:
	app/controllers/users_controller.rb
2015-03-23 09:45:40 -07:00
Dmitriy Zaporozhets e24da35984 Merge branch 'improve-contributions-calendar' into 'master'
Replace commits calendar with contributions calendar

* count opening of issues and merge requests
* dont trigger git repository - use events from database
* count pushes instead of commits for faster and easier counting
* much-much faster since does not affected by repository size

See merge request !420
2015-03-23 16:40:55 +00:00
Stan Hu a3daead1b0 Include missing events and fix save functionality in admin service template settings form
Closes #1275
2015-03-23 05:51:38 -07:00
Dmitriy Zaporozhets fee1f2e0ab Fix atom feed for user page 2015-03-22 19:41:12 -07:00
Dmitriy Zaporozhets 9968250211 Add inifinite scroll to user activity on user page 2015-03-22 15:40:26 -07:00
Dmitriy Zaporozhets 43afe46bbd Refactor contributions events and write tests for calendar 2015-03-22 13:55:00 -07:00
Dmitriy Zaporozhets 64891c6c40 Replace commits calendar with contributions calendar
* count opening of issues and merge requests
* dont trigger git repository - use events from database
* much-much faster since does not affected by repository size
2015-03-21 23:48:08 -07:00
Dmitriy Zaporozhets 777c119fd2 Restyle oauth accounts at profile page and add ability to unlink account 2015-03-21 17:46:00 -07:00
Dmitriy Zaporozhets f0d052b6e7 Merge branch 'user-location' into 'master'
Location field in user profile

Twitter allows you to set string with location information.
I find it very useful in work to know where user from. It allows to communicate with knowing time difference and cultural things.

See merge request !411
2015-03-21 00:54:03 +00:00
Dmitriy Zaporozhets 6ef20926ee Add location to user profile 2015-03-20 16:52:23 -07:00
Valery Sizov e5fe14b2fb Link to CI with ref 2015-03-20 19:19:29 +02:00
Carlos Ribeiro 2435476167 Add error message when have error on profile screen 2015-03-19 23:31:25 -03:00
Hannes Rosenögger 9487c37037 Only trigger actual search if a search string is present 2015-03-19 10:50:34 +01:00
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 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
Vinnie Okada 2e672c39a0 Fix restricted visibility bugs
Check for nil values in the restricted_visibility_level validation
method, and set the restricted visibility request parameter to `[]` when
it's missing from the request.
2015-03-16 13:59:50 -06: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 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 31fc73f0a9 Use project_member instead of team_member. 2015-03-15 13:50:38 +01:00
Douwe Maan 99f995755e Use group_member instead of users_group or membership. 2015-03-15 13:49:41 +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
Dmitriy Zaporozhets ec02cdf205 Merge branch 'master' into mr-filter-by-title
Conflicts:
	app/controllers/projects/merge_requests_controller.rb
2015-03-12 16:29:03 -07:00
Dmitriy Zaporozhets 80b2f3fb86 Implement merge requests search
It is same search like we have at issues page. It allows to quickly
filter merge requests based on title or desription. I copy-pasted some
js code from Issues.js. In future search (filtering) logic should be
refactoed into one class for merge requests and issues
2015-03-12 16:20:58 -07:00
Dmitriy Zaporozhets f0cbbd70bb Use same constant for amount of items per page 2015-03-12 15:37:00 -07:00
Hannes Rosenögger 7ff9c8229d Add a service to support external wikis 2015-03-12 19:13:51 +01:00
Dmitriy Zaporozhets 1065f3d30b Merge branch 'github-org-repos' into 'master'
Fix missing GitHub organisation repositories on import page.

Private repositories belonging to organizations rather than users can't be imported because `client.repos(org.login)` was requesting `/users/:org_login/repos` (which only returns public org repo's), while we need `/orgs/:org_login/repos` (which includes both public and private). The `client.org_repos` method does this.

cc @marin This is a bug in 7.8.x, but I'm not sure if it needs a minor release now or if it can go in 7.9.

See merge request !1683
2015-03-12 17:13:25 +00:00
Valery Sizov 0b38c3e041 group controller refactoring 2015-03-12 17:08:48 +02:00
Douwe Maan 3175438f02 Fix missing GitHub organisation repositories on import page. 2015-03-12 13:47:15 +01:00
Dmitriy Zaporozhets c02d891cb5 Merge branch 'master' into new-emoji
Conflicts:
	Gemfile.lock
2015-03-11 18:02:37 -07:00
Dmitriy Zaporozhets 5f40253f76 Remove annoying notice messages when create/update merge request 2015-03-11 16:07:33 -07:00
Dmitriy Zaporozhets d2d709a252 Update html-pipeline and emoji 2015-03-11 16:05:01 -07:00
Dmitriy Zaporozhets 4b1bb42bf7 Fix tests for project removing 2015-03-10 21:56:19 -07:00
Dmitriy Zaporozhets 0414b2ae98 Remove projects page from dashboard 2015-03-10 16:03:37 -07:00
Dmitriy Zaporozhets 83f7e98d9a Add project filter by visibility and tag to explore page 2015-03-10 15:59:14 -07:00
Dmitriy Zaporozhets 7fd4dc1e11 Remove group rendering from dashboard page 2015-03-10 13:17:16 -07:00
Dmitriy Zaporozhets 961971544a Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2015-03-10 12:03:58 -07:00
Dmitriy Zaporozhets 828519ba05 Merge branch 'fix_importers' into 'master'
Fix importers with OCC

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/1180

Using validates_uniqueness_of does not guarantee the absence of duplicate record insertions. When users click button "import all" it will create duplicating group in database and data integrity will be broken.

http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html#method-i-validates_uniqueness_of

I use optimistic concurrency control for handling this situation.

See merge request !1647
2015-03-10 19:01:05 +00:00
Dmitriy Zaporozhets 0fa4d0929d Merge branch 'uploads-authorization' into 'master'
Reject access to group/project avatar if the user doesn't have access.

Closes #2050.

I'll add tests for EE logos once this is merged here and merged into EE.

See merge request !1671
2015-03-10 18:20:46 +00:00