summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'emailsonpush-create-delete' into 'master'Dmitriy Zaporozhets2015-03-231-2/+96
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-6/+6
| |
| * Send EmailsOnPush email when branch or tag is created or deleted.Douwe Maan2015-03-181-2/+96
| |
* | Merge branch 'improve-contributions-calendar' into 'master'Dmitriy Zaporozhets2015-03-232-55/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Fix user controller specsDmitriy Zaporozhets2015-03-221-17/+4
| | |
| * | Refactor repository specsDmitriy Zaporozhets2015-03-221-38/+7
| | |
* | | Fix OAuth2 issue importing a new project from GitHub and GitLabStan Hu2015-03-223-0/+49
| | | | | | | | | | | | Closes #1268
* | | Merge branch 'disable-ref-generation-in-code-blocks' into 'master'Dmitriy Zaporozhets2015-03-221-0/+20
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable reference generation in preformatted/code blocks ### Summary If a user adds text in code or preformatted text via Markdown or HTML that contains `#XXX`, the system adds a note that issue `XXX` was mentioned. This is particularly annoying because we often list gdb backtrace dumps into our issues, and many issues get mentioned as a result. For example: ``` (gdb) bt #0 0x00000000004004c4 in second () at main.cc:6 #1 0x00000000004004d2 in first () at main.cc:11 #2 0x00000000004004dd in main () at main.cc:17 (gdb) ``` ### Steps to reproduce 1. In an issue, write the above text using Markdown or HTML tags (e.g. `<code>`, `<pre>`). 2. Observe that [issue 1](https://gitlab.com/gitlab-org/gitlab-ce/issues/1) and [issue 2](https://gitlab.com/gitlab-org/gitlab-ce/issues/2) have a note that says they were mentioned. ### Expected behavior Everything enclosed in the code blocks should be ignored as references. ### Observed behavior Issues get referenced unnecessarily. ### Fix I've made `reference_extractor.rb` strip out HTML and Markdown blocks before processing. I considered running the raw text through the entire Markdown processor, but this seems overkill and perhaps could lead to some unintended side effects. See merge request !365
| * | | Disable reference creation for comments surrounded by code/preformatted blocksStan Hu2015-03-191-0/+20
| | | |
* | | | Fix dots in Wiki slug causing errorsStan Hu2015-03-211-0/+41
| |/ / |/| | | | | | | | Closes #1263, #431
* | | Merge branch 'backup-permissions' into 'master'Dmitriy Zaporozhets2015-03-211-7/+56
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change permissions on backup files - #2 Use more restrictive permissions for backup tar files and for the db, uploads, and repositories directories inside the tar files. See #1894. Now the backup task recursively `chmod`s the `db/`, `uploads/`, and `repositories/` folders with 0700 permissions, and the tar file is created as 0600. This is a followup to !1703, which was reverted because it broke Rspec tests. The test failures were due to the rake task changing directories and not changing back, which I fixed with this commit. cc @sytse See merge request !1716
| * | | Change permissions on backup filesVinnie Okada2015-03-171-7/+56
| | | | | | | | | | | | | | | | | | | | Use more restrictive permissions for backup tar files and for the db, uploads, and repositories directories inside the tar files.
* | | | Extend push_tag event to include tag message and last commitKamil Trzcinski2015-03-212-10/+47
| | | |
* | | | Link to CI with refValery Sizov2015-03-202-3/+3
| | | |
* | | | Fix cross references when usernames, milestones, or project names contain ↵Stan Hu2015-03-192-11/+156
| |/ / |/| | | | | | | | | | | | | | underscores. Remove emphasis from system notes to avoid Markdown conflicts in names.
* | | Extend the commit calendar to show the actual commits for a dateHannes Rosenögger2015-03-182-10/+57
| |/ |/|
* | Merge branch 'external_wiki' into 'master'Dmitriy Zaporozhets2015-03-181-0/+39
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-121-0/+39
| |
* | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceDmitriy Zaporozhets2015-03-171-2/+25
|\ \
| * \ Merge branch 'atom-xhtml-squashed' into 'master'Douwe Maan2015-03-171-2/+25
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix invalid Atom feeds when using emoji, horizontal rules, or images This is a fix for issues #880, #723, #1113. Markdown must be rendered to XHTML, not HTML, when generating summary content for Atom feeds. Otherwise, content-less tags like *img* and *hr* are not terminated and make the Atom XML invalid. Such tags are generated when issue descriptions, merge request descriptions, comments, or commit messages use emoji, horizontal rules, or images. To pass this option through from the relevant Haml templates to the proper place in the `gfm()` method, a new method `gfm_with_options()` is introduced. It reuses the options dictionary passed to `markdown()` and interprets options `xhtml` and `parse_tasks` from it (the latter was a convenient replacement for `gfm_with_tasks()`). `xhtml` is already interpreted by Redcarpet::Render::HTML, but that alone was not sufficient, because the post-processing in `gfm()` would convert its XHTML tags back to HTML. I found no way of passing additional optional options to the existing `gfm()` method without requiring updates to existing callers and without getting in the way of the existing optional arguments, but maybe someone who knows more about Ruby than I can think of one. Thorough review appreciated since this is the first time I have used Ruby. See merge request !344
| | * | Fix invalid Atom feeds when using emoji, horizontal rules, or images.Christian Walther2015-03-161-2/+25
| | | | | | | | | | | | | | | | Fixes issues #880, #723, #1113: Markdown must be rendered to XHTML, not HTML, when generating summary content for Atom feeds. Otherwise, content-less tags like <img> and <hr>, generated when issue descriptions, merge request descriptions, comments, or commit messages use emoji, horizontal rules, or images, are not terminated and make the Atom XML invalid.
* | | | Merge branch 'last-deploy-key' into 'master'Dmitriy Zaporozhets2015-03-171-0/+33
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+33
| |/ / /
* | | | Merge branch 'issue_subscription' into 'master'Dmitriy Zaporozhets2015-03-171-0/+32
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-161-0/+32
| | | |
* | | | Revert "Merge branch 'backup-permissions' into 'master'"Dmitriy Zaporozhets2015-03-161-43/+7
| | | | | | | | | | | | | | | | | | | | This reverts commit c42262b43b009af990e5769840391862d64a1c2d, reversing changes made to c6586b1283a94c8f08bc669f4d8a9384b263073e.
* | | | Merge branch 'backup-permissions' into 'master'Dmitriy Zaporozhets2015-03-171-7/+43
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change permissions on backup files Use more restrictive permissions for backup tar files and for the db, uploads, and repositories directories inside the tar files. See #1894. Now the backup task recursively `chmod`s the `db/`, `uploads/`, and `repositories/` folders with 0700 permissions, and the tar file is created as 0600. cc @sytse See merge request !1703
| * | | | Change permissions on backup filesVinnie Okada2015-03-151-7/+43
| | | | | | | | | | | | | | | | | | | | | | | | | Use more restrictive permissions for backup tar files and for the db, uploads, and repositories directories inside the tar files.
* | | | | Merge branch 'post-receive-base64' into 'master'Dmitriy Zaporozhets2015-03-161-9/+9
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent gitlab-shell character encoding issues by receiving its changes as raw data. Depends on gitlab/gitlab-shell!65. Fixes: - https://github.com/gitlabhq/gitlabhq/issues/7486 - https://gitlab.com/gitlab-org/gitlab-ce/issues/858 - https://gitlab.com/gitlab-org/gitlab-ce/issues/877 - https://gitlab.com/gitlab-org/gitlab-ce/issues/965 See merge request !1701
| * | | | | Prevent gitlab-shell character encoding issues by receiving its changes as ↵Douwe Maan2015-03-151-9/+9
| |/ / / / | | | | | | | | | | | | | | | raw data.
* | | | | Merge branch 'fix-restricted-visibility' into 'master'Dmitriy Zaporozhets2015-03-166-15/+167
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1416-106/+661
| |\ \ \ \ \ | | |/ / / / | | | | | | | | | | | | | | | | | | Conflicts: db/schema.rb
| * | | | | Add tests for snippet servicesVinnie Okada2015-03-142-0/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Rspec tests for the new UpdateSnippetService and CreateSnippetService classes.
| * | | | | Enforce restricted visibilities for snippetsVinnie Okada2015-03-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new service classes to create and update project and personal snippets. These classes are responsible for enforcing restricted visibility settings for non-admin users.
| * | | | | Allow admins to override restricted visibilityVinnie Okada2015-03-083-3/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow admins to use restricted visibility levels when creating or updating projects.
| * | | | | Move restricted visibility settings to the UIVinnie Okada2015-03-071-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add checkboxes to the application settings page for restricted visibility levels, and remove those settings from gitlab.yml.
* | | | | | Move group members index from `/members` to `/group_members`.Douwe Maan2015-03-154-8/+8
| | | | | |
* | | | | | Move project members index from `/team` to `/project_members`Douwe Maan2015-03-153-6/+6
| | | | | |
* | | | | | Use `project_member` instead of `team_member`.Douwe Maan2015-03-152-11/+8
| | | | | |
* | | | | | Use `group_member` instead of `users_group` or `membership`.Douwe Maan2015-03-152-9/+9
| |/ / / / |/| | | |
* | | | | Unblock user if they were unblocked in AD.Douwe Maan2015-03-131-1/+10
| |/ / / |/| | |
* | | | Merge branch 'group-icon-performance' into 'master'Dmitriy Zaporozhets2015-03-122-18/+21
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent database query each time we render group avatar Fixes #2118 See merge request !1688
| * | | | Fix specsDmitriy Zaporozhets2015-03-122-18/+21
| | |_|/ | |/| |
* | | | Block user if he/she was blocked in Active DirectoryDmitriy Zaporozhets2015-03-121-1/+6
|/ / /
* | | Merge branch 'fix_email_images' into 'master'Douwe Maan2015-03-121-3/+79
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix email images ## Dependencies: This MR Depends on gitlab-org/html-pipeline-gitlab!4 being **merged and published** to rubygems.org ## What does this MR do? This MR fixes the broken images in emails that occured scince we introduced access control for all attachments in 7.8. The access control lead to broken images, because the user usually isn't logged into gitlab when opening the email in his mail client. The solution to fix this, is to replace all images that were uploaded to gitlab as attachemnts with inline images in emails. I only added one test for images in notes, because all notes share the same view. If it works fine for a note on a commit, then it'll also work the same for notes on a MR or on issues. @DouweM can you review this please? Closes #1161 See merge request !373
| * | | replace images in emails with inline imagesHannes Rosenögger2015-03-121-3/+79
| | | | | | | | | | | | | | | | | | | | | | | | This adds the functionality of replacing all images that were uploaded to gitlab with inline images(base64) in emails. This change fixes the broken images in emails that 7.8 introduced
* | | | Merge branch 'github-org-repos' into 'master'Dmitriy Zaporozhets2015-03-121-2/+5
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Fix missing GitHub organisation repositories on import page.Douwe Maan2015-03-121-2/+5
| | | |
* | | | Fix tests for emojioneDmitriy Zaporozhets2015-03-111-3/+3
| | | |
* | | | Merge branch 'fix-code-preview' into 'master'Marin Jankovski2015-03-111-0/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix code preview theme setting for comments, issues, merge requests, and snippets User color scheme was not being used: default white color scheme was always chosen. Also, default background for code in notes was always overriding the user color scheme. Closes #1139 See merge request !357