summaryrefslogtreecommitdiff
path: root/app/models
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'emailsonpush-create-delete' into 'master'Dmitriy Zaporozhets2015-03-231-2/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Send EmailsOnPush email when branch or tag is created or deleted. Addresses #1951, #1957 and #1925. ![Screen_Shot_2015-03-17_at_13.58.15](https://dev.gitlab.org/gitlab/gitlabhq/uploads/16ff25adb4b4a7e1923612e0652442b4/Screen_Shot_2015-03-17_at_13.58.15.png) ![Screen_Shot_2015-03-17_at_13.58.22](https://dev.gitlab.org/gitlab/gitlabhq/uploads/e346c1d84aba3a093b722d0a4167e289/Screen_Shot_2015-03-17_at_13.58.22.png) ![Screen_Shot_2015-03-17_at_13.58.28](https://dev.gitlab.org/gitlab/gitlabhq/uploads/720437ecc13f317c6d20eff82ac60bd7/Screen_Shot_2015-03-17_at_13.58.28.png) ![Screen_Shot_2015-03-17_at_13.58.34](https://dev.gitlab.org/gitlab/gitlabhq/uploads/2b302bb6cdbe27c96a8dff1375236602/Screen_Shot_2015-03-17_at_13.58.34.png) See merge request !1709
| * Clean up code by using keyword arguments.Douwe Maan2015-03-231-1/+7
| |
| * Send EmailsOnPush email when branch or tag is created or deleted.Douwe Maan2015-03-181-1/+1
| |
* | Merge branch 'improve-contributions-calendar' into 'master'Dmitriy Zaporozhets2015-03-234-72/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Refactor contributions events and write tests for calendarDmitriy Zaporozhets2015-03-222-5/+8
| | |
| * | Replace commits calendar with contributions calendarDmitriy Zaporozhets2015-03-212-67/+0
| | | | | | | | | | | | | | | | | | * 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
* | | Fix dots in Wiki slug causing errorsStan Hu2015-03-212-2/+3
|/ / | | | | | | Closes #1263, #431
* | Cache head commit and head treeDmitriy Zaporozhets2015-03-211-2/+10
| |
* | Cache lookup results into hash to prevent repeating same requests to git repoDmitriy Zaporozhets2015-03-211-1/+10
| |
* | Cache project branches and tags into variablesDmitriy Zaporozhets2015-03-211-0/+16
| |
* | Merge branch 'link_to_ci_with_ref' into 'master'Dmitriy Zaporozhets2015-03-205-18/+18
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Link to CI with ref gitlab/gitlab-ci#162 !!! Should be merged simultaneously with https://dev.gitlab.org/gitlab/gitlab-ci/merge_requests/129 See merge request !1638
| * | Link to CI with refValery Sizov2015-03-205-18/+18
| | |
* | | Merge branch 'merge-status-transition' into 'master'Dmitriy Zaporozhets2015-03-201-2/+2
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | Update merge_status state to allow more transitions Previously you could only transition from the unchecked state to one of the others. This meant that the mark_as_unmerged call in AutoMergeService would rarily be able to actually transition the state. As it would usually have already been set to can_be_merged before it hit that service. Spec and Spinach tests have been run locally and all pass. See merge request !405
| * | Update merge_status state to allow more transitionsDJ Mountney2015-03-191-2/+2
| | | | | | | | | | | | Previously you could only transition from the unchecked state to one of the others. This meant that the mark_as_unmerged call in AutoMergeService would rarily be able to actually transition the state. As it would usually have already been set to can_be_merged before it hit that service.
* | | Fix cross references when usernames, milestones, or project names contain ↵Stan Hu2015-03-191-10/+15
|/ / | | | | | | | | | | underscores. Remove emphasis from system notes to avoid Markdown conflicts in names.
* | Revert "Note: add default_scope { order(created_at: :asc, id: :asc) }"Dmitriy Zaporozhets2015-03-181-1/+0
| | | | | | | | This reverts commit 7602cef572fd770a06eb3d94f2aef57c2693dcb6.
* | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceDmitriy Zaporozhets2015-03-181-0/+1
|\ \
| * \ Merge branch 'api-sort-merge-request-comments' into 'master'Douwe Maan2015-03-181-0/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Api: sort merge_request comments Add default_scope { order(created_at: :asc, id: :asc) } in Note so comments are sorted when fetched through api. See merge request !256
| | * | Note: add default_scope { order(created_at: :asc, id: :asc) }Samuel Bernard2015-03-181-0/+1
| | | |
* | | | Merge branch 'fix-mr-push-range' into 'master'Dmitriy Zaporozhets2015-03-181-2/+6
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix condensed range in MR push comment. Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/1246 In https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/326#note_984907, you see that the compare page doesn't actually have 39 commits because we're using `first_new_commit^`, which is not always the same as `oldrev`. With this MR, we use `oldrev` instead, which will always work. See merge request !1721
| * | | Fix condensed range in MR push comment.Douwe Maan2015-03-181-2/+6
| | |/ | |/|
* | | Merge branch 'changelog-link' into 'master'Dmitriy Zaporozhets2015-03-182-29/+49
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add changelog, license and contribution guide links to project sidebar. If the version is known, the "Version: 7.9.0pre" button links to the changelog, otherwise a "View changelog" button is shown. ![Screen_Shot_2015-03-18_at_14.22.29](https://dev.gitlab.org/gitlab/gitlabhq/uploads/747acc018ec9a188098e0f0bc4e91cc3/Screen_Shot_2015-03-18_at_14.22.29.png) See merge request !1708
| * | | Add license and contribution guide links to project sidebar.Douwe Maan2015-03-181-1/+9
| | | |
| * | | Fix tree readme.Douwe Maan2015-03-181-4/+10
| | | |
| * | | Link project version to changelog if there is one.Douwe Maan2015-03-181-1/+8
| | | |
| * | | Find tree readme lazily.Douwe Maan2015-03-181-20/+19
| | | |
| * | | Move finding of contributing file from tree to repository.Douwe Maan2015-03-182-7/+7
| |/ /
* | | Merge branch 'new-branch-commits' into 'master'Dmitriy Zaporozhets2015-03-181-1/+1
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | List new commits for newly pushed branch in activity view. When someone pushes commits, I want to see them, regardless if it's a new or existing branch. If it's a new branch, we compare with the default branch (usually master). ![Screen_Shot_2015-03-17_at_15.49.13](https://dev.gitlab.org/gitlab/gitlabhq/uploads/4cb7e0d833bc83a30197db81d4b273bc/Screen_Shot_2015-03-17_at_15.49.13.png) See merge request !1711
| * | List new commits for newly pushed branch in activity view.Douwe Maan2015-03-181-1/+1
| |/
* | Extend the commit calendar to show the actual commits for a dateHannes Rosenögger2015-03-182-0/+23
|/
* Fix external wiki serviceDmitriy Zaporozhets2015-03-172-2/+2
|
* Align services like in EE for easier mergingDmitriy Zaporozhets2015-03-171-4/+22
|
* Merge branch 'external_wiki' into 'master'Dmitriy Zaporozhets2015-03-182-0/+49
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Add a service to support external wikisHannes Rosenögger2015-03-122-0/+49
| |
* | Merge branch 'last-deploy-key' into 'master'Dmitriy Zaporozhets2015-03-171-0/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | Delete deploy key when last connection to a project is destroyed. Addresses #1959. See merge request !1710
| * | Delete deploy key when last connection to a project is destroyed.Douwe Maan2015-03-171-0/+8
| | |
* | | Merge branch 'issue_subscription' into 'master'Dmitriy Zaporozhets2015-03-172-0/+38
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | testsValery Sizov2015-03-162-1/+20
| | |
| * | fix specsValery Sizov2015-03-161-1/+2
| | |
| * | rename table subscribe; make it polymorficValery Sizov2015-03-163-11/+13
| | |
| * | code folding fixValery Sizov2015-03-162-3/+6
| | |
| * | SubscriptionValery Sizov2015-03-152-0/+13
| | |
* | | Fix restricted visibility bugsVinnie Okada2015-03-161-3/+5
| | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'fix-restricted-visibility' into 'master'Dmitriy Zaporozhets2015-03-163-16/+29
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * \ \ Merge branch 'master' into fix-restricted-visibilityVinnie Okada2015-03-1412-77/+59
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: db/schema.rb
| * | | | Update snippet authorizationVinnie Okada2015-03-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Allow authors and admins to update the visibility level of personal and project snippets.
| * | | | Allow admins to override restricted visibilityVinnie Okada2015-03-081-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Allow admins to use restricted visibility levels when creating or updating projects.
| * | | | Move restricted visibility settings to the UIVinnie Okada2015-03-072-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | Add checkboxes to the application settings page for restricted visibility levels, and remove those settings from gitlab.yml.
* | | | | Remove old team scopes.Douwe Maan2015-03-153-3/+0
| | | | |
* | | | | Use `member` instead of `tm`.Douwe Maan2015-03-151-21/+21
| | | | |