summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Don't include system notes in issue/MR comment count.notes-count-without-systemDouwe Maan2015-03-231-1/+1
|
* Fix OAuth2 issue importing a new project from GitHub and GitLabStan Hu2015-03-223-4/+4
| | | | Closes #1268
* Merge branch 'disable-ref-generation-in-code-blocks' into 'master'Dmitriy Zaporozhets2015-03-221-1/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+7
| |
* | Merge branch 'backup-permissions' into 'master'Dmitriy Zaporozhets2015-03-211-18/+25
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Call chdir() with a blockVinnie Okada2015-03-191-18/+17
| | |
| * | Change permissions on backup filesVinnie Okada2015-03-171-5/+13
| | | | | | | | | | | | | | | 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-211-1/+2
| | |
* | | Revert "Increase timeout for Git-over-HTTP requests."Dmitriy Zaporozhets2015-03-191-13/+0
| | | | | | | | | | | | | | | | | | | | | This reverts commit 516bcabbf42d60db2ac989dce4c7187b2a1e5de9. Conflicts: Gemfile
* | | Merge branch 'bugfix/block_ldap_users_cronjob' into 'master'Dmitriy Zaporozhets2015-03-191-4/+5
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed rake task gitlab:cleanup:block_removed_ldap_users Maybe not the most elegant solution, but it works for us. This closes issue gitlab-org/gitlab-ce#955. See merge request !338
| * | | fixed rake task to block removed ldap usersDaniel Steinborn2015-02-161-4/+5
| | | |
* | | | Merge branch 'rake_backup' into 'master'Dmitriy Zaporozhets2015-03-191-2/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backup repo with tar instead of git bundle Fixes gitlab/gitlab-ee#246 See merge request !1723
| * | | | backup repo with tar instead of git bundleValery Sizov2015-03-191-2/+3
| | |_|/ | |/| |
* | | | Merge branch 'fewer-constants-more-helpres' into 'master'Dmitriy Zaporozhets2015-03-192-4/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Fewer Git constants, more Git helpers. See merge request !1727
| * | | | Fewer constants, more helpers.Douwe Maan2015-03-192-4/+6
| |/ / /
* | | | Dont exit from brakeman rake taskDmitriy Zaporozhets2015-03-191-1/+1
|/ / /
* | | Move application setting to separate variable.Marin Jankovski2015-03-181-2/+4
| | |
* | | Handle nil restricted visibility settingsVinnie Okada2015-03-181-1/+5
| | | | | | | | | | | | | | | Return `true` from `non_restricted_level?` when the `restricted_visibility_levels` setting is nil.
* | | Merge branch 'new-branch-commits' into 'master'Dmitriy Zaporozhets2015-03-181-8/+7
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-8/+7
| | |/ | |/|
* | | Extend the commit calendar to show the actual commits for a dateHannes Rosenögger2015-03-181-0/+8
|/ /
* | Merge branch 'atom-xhtml-squashed' into 'master'Douwe Maan2015-03-172-13/+23
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-162-13/+23
| | | | | | | | | | | | 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.
* | | Revert "Merge branch 'backup-permissions' into 'master'"Dmitriy Zaporozhets2015-03-161-4/+0
| | | | | | | | | | | | | | | This reverts commit c42262b43b009af990e5769840391862d64a1c2d, reversing changes made to c6586b1283a94c8f08bc669f4d8a9384b263073e.
* | | Merge branch 'backup-permissions' into 'master'Dmitriy Zaporozhets2015-03-171-0/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+4
| | | | | | | | | | | | | | | | | | | | Use more restrictive permissions for backup tar files and for the db, uploads, and repositories directories inside the tar files.
* | | | Merge branch 'fix-restricted-visibility' into 'master'Dmitriy Zaporozhets2015-03-166-29/+35
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1415-24/+108
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | Conflicts: db/schema.rb
| * | | | More restricted visibility changesVinnie Okada2015-03-101-4/+4
| | | | | | | | | | | | | | | | | | | | Bug fixes and new tests for the restricted visibility changes.
| * | | | Enforce restricted visibilities for snippetsVinnie Okada2015-03-082-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-082-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Allow admins to use restricted visibility levels when creating or updating projects.
| * | | | Move restricted visibility settings to the UIVinnie Okada2015-03-072-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Add checkboxes to the application settings page for restricted visibility levels, and remove those settings from gitlab.yml.
* | | | | Let the server fix unconfigured gitZeger-Jan van de Weg2015-03-162-10/+31
| | | | |
* | | | | Use `project_member` instead of `team_member`.Douwe Maan2015-03-152-15/+15
| | | | |
* | | | | Use `group_member` instead of `users_group` or `membership`.Douwe Maan2015-03-151-5/+5
| | | | |
* | | | | Fix typoVasilij Schneidermann2015-03-141-1/+1
| |/ / / |/| | |
* | | | Merge branch 'ldap-unblock-user' into 'master'Dmitriy Zaporozhets2015-03-131-0/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unblock user if they were unblocked in AD. Fixes problem with !1687. See merge request !1694
| * | | | Unblock user if they were unblocked in AD.Douwe Maan2015-03-131-0/+1
| | | | |
* | | | | Merge branch 'tag-branch-hooks' into 'master'Dmitriy Zaporozhets2015-03-131-1/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Execute hooks and services when branch or tag is created or deleted through web interface. Fixes #2095. Split up into commits to make it easier to see why what was changed :) See merge request !1692
| * | | | | Set push data object kind in PushDataBuilder.Douwe Maan2015-03-131-1/+2
| |/ / / /
* | | | | Fix import pages not working after first load.Douwe Maan2015-03-133-3/+3
|/ / / /
* | | | Block user if he/she was blocked in Active DirectoryDmitriy Zaporozhets2015-03-121-1/+8
| | | |
* | | | Merge branch 'blue-theme' into 'master'Dmitriy Zaporozhets2015-03-121-1/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | Add blue theme to GitLab See merge request !1682
| * | | | Add blue theme to GitLabDmitriy Zaporozhets2015-03-111-1/+3
| | | | |
* | | | | Merge branch 'markdown-smb-link' into 'master'Dmitriy Zaporozhets2015-03-121-0/+8
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | Allow smb:// links in Markdown text.Douwe Maan2015-03-101-0/+8
| | | | |
* | | | | Merge branch 'fix-code-preview' into 'master'Marin Jankovski2015-03-111-2/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | Fix code preview theme setting for comments, issues, merge requests, and ↵Stan Hu2015-03-101-2/+3
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | snippets. Also preserve code preview color scheme in events dashboard. Assign default colors to all code blocks shown as <pre class="code highlight [color_scheme]"> Closes #1139
* | | | | Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ceDmitriy Zaporozhets2015-03-111-0/+1
|\ \ \ \ \
| * \ \ \ \ Merge branch 'generate-valid-json' into 'master'Hannes Rosenögger2015-03-111-0/+1
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generate valid json This patch helps to be compatible to other programing languages as it improves the validation of hook data. It seems only ruby can handle 'nil' as value while other json decode function will fatal. See merge request !182