Commit Graph
3539 Commits
Author SHA1 Message Date
Douwe Maan 8ed7ac9d44 Use project.commit convenience method. 2015-04-24 12:29:36 +02:00
Douwe Maan 84a1590252 Let commit model know about its project. 2015-04-24 12:29:36 +02:00
Robert Speicher a14d109b9b Provide autoload paths for filters to prevent circular dependency 2015-04-23 12:58:55 -04:00
Dmitriy Zaporozhets 285ae60c15 Merge branch 'issue-body-code-mentions' into 'master'
Fix bug causing at-username inside code blocks to sometimes be picked up as a user mention.

Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2254.

See merge request !553
2015-04-23 12:33:01 +00:00
Robert Speicher fb5116caa2 Use search_text_nodes helper in our custom filters
Closes #1477
2015-04-22 13:18:15 -04:00
Robert Speicher fca624670a Update Gitlab::Markdown to use the 🆕 EmojiFilter
Removes emoji-centric tests from GFM specs 💥
2015-04-21 12:53:42 -04:00
Robert Speicher 4ced630fed Add Gitlab::Markdown::EmojiFilter 2015-04-21 12:53:42 -04:00
Dmitriy Zaporozhets 2cd501f7e4 Merge branch 'rs-reference-filters' into 'master'
Convert GFM reference handling to html-pipeline filters

- `Gitlab::Markdown` is now much cleaner
- Better separation of concerns
- Cleaner, less brittle, more maintainable specs for each reference type.
- Label references actually work!

See merge request !1753
2015-04-21 16:43:54 +00:00
Douwe Maan 51ad59e0d8 Fix bug causing @whatever inside code blocks to sometimes be picked up as a user mention. 2015-04-21 14:58:18 +02:00
Douwe Maan 1c30f77599 Don't autolink masked imported email addresses. 2015-04-21 10:32:48 +02:00
Douwe Maan 18f80c5560 Fix rendering of deleted blocking/blocked-on statuses. 2015-04-21 10:32:29 +02:00
Douwe Maan bc2dd5e772 Import "Comment #10" as "Comment 10" to not incorrectly reference issue. 2015-04-21 10:31:50 +02:00
Douwe Maan c242ca9a17 Get imported links to render correctly by not escaping all special chars. 2015-04-21 10:31:15 +02:00
Douwe Maan 96c03199dd Add "imported from Google Code" to imported issues. 2015-04-21 10:30:23 +02:00
Douwe MaanandRobert Speicher c52bf4ad3c Tweak single-word label regex to fix pending spec. 2015-04-20 13:01:47 -04:00
Douwe MaanandRobert Speicher b5802d144b project_from_ref returns nil when reference doesn't exist. 2015-04-20 13:01:47 -04:00
Robert Speicher 2823c058d8 project_from_ref returns nil when reference can't be accessed
Prior it would return the project from the current context, which wasn't
the intended behavior.
2015-04-20 13:01:47 -04:00
Robert Speicher 34f1dbb143 Better commit lookup for CommitRangeReferenceFilter 2015-04-20 13:01:46 -04:00
Robert Speicher 6853465acf Remove extraneous IGNORE_PARENTS from filter 2015-04-20 13:01:46 -04:00
Robert Speicher 621687bfdf Fix user_can_reference_project? check 2015-04-20 13:01:46 -04:00
Robert Speicher b905702d4f Escape title attributes in references 2015-04-20 13:01:46 -04:00
Robert Speicher 31172475d2 Better guard against nil projects in ReferenceFilter 2015-04-20 13:01:46 -04:00
Robert Speicher 9eaaa7cdef Minor doc fix
[ci skip]
2015-04-20 13:01:45 -04:00
Robert Speicher 5b6c1a2182 Fix Issue and ExternalIssue reference specs 2015-04-20 13:01:45 -04:00
Robert Speicher b3b8fc6c8a DRY up reference filters using ReferenceFilter base class 2015-04-20 13:01:45 -04:00
Robert Speicher 6189b24fdd Add a ReferenceFilter base class
This will allow for the removal of a lot of duplication from the
reference filters.
2015-04-20 13:01:45 -04:00
Robert Speicher c4eb6a55f1 Fix user_can_reference_group? check 2015-04-20 13:01:45 -04:00
Robert Speicher 52909f8bdb Add permission check to ReferenceExtractor's user mentions 2015-04-20 13:01:45 -04:00
Robert Speicher 62282971e0 Rename user_can_read_group? to user_can_reference_group? 2015-04-20 13:01:44 -04:00
Robert Speicher a803cd51eb Check for project read permissions in cross-references 2015-04-20 13:01:44 -04:00
Robert Speicher 34a23bda60 Add current_user to filter context 2015-04-20 13:01:43 -04:00
Robert Speicher 43c62ca3f2 Remove Gitlab::Markdown from Gitlab::ReferenceExtractor 2015-04-20 13:01:43 -04:00
Robert Speicher 29604ff2c3 Add permission checking to UserReferenceFilter 2015-04-20 13:01:43 -04:00
Robert Speicher 189c5347be Add name-based referencing to LabelReferenceFilter 2015-04-20 13:01:43 -04:00
Robert Speicher 77a6746a75 Run SanitizationFilter before our reference filters 2015-04-20 13:01:42 -04:00
Robert Speicher 4cb1cc2b64 Make CommitRange and Snippets cross-referable 2015-04-20 13:01:42 -04:00
Robert Speicher 96c2b94048 Reference filters
Commit ranges, commits, external issues, issues, labels, merge requests,
snippets, users.
2015-04-20 13:01:42 -04:00
Douwe Maan c75c6b840b Revert disallowing usernames to end in period. 2015-04-20 12:41:44 +02:00
Dmitriy Zaporozhets bd97715a57 Merge branch 'fix-label-color' into 'master'
Parse GFM references after sanitizing

Parse GFM references - labels, issues, MRs, etc. - after calling the HTML Pipeline `SanitizationFilter` so that we can use non-whitelisted attributes like `style`.  See #2188.

See merge request !1745
2015-04-20 08:40:13 +00:00
Vinnie Okada df9a992c15 Fix GFM extractions
Extract and re-insert links after sanitizing user markup.
2015-04-17 20:39:38 -06:00
Dmitriy Zaporozhets e1099f9717 Merge branch 'google-code-import-performance' into 'master'
Decrease memory use and increase performance of Google Code importer.

Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2241.

See merge request !536
2015-04-17 14:01:33 +00:00
Douwe Maan 38982136ec Decrease memory use and increase performance of Google Code importer. 2015-04-17 14:55:51 +02:00
Douwe Maan 7d98c8842d Move import data out of project so it doesn't take ages to load. 2015-04-17 14:49:00 +02:00
Vinnie Okada acd80bdc2d Add new rake task
Add a task that checks repository integrity with `git fsck`.
2015-04-15 22:22:20 -06:00
Douwe Maan 80097606f5 Make sure user has access to namespace in import tests. 2015-04-15 16:58:43 +02:00
Dmitriy Zaporozhets 345e32d332 Merge branch 'sstanovnik-openssh_fix' into 'master'
Fix generating SSH key fingerprints with OpenSSH 6.8.

Replaces https://github.com/gitlabhq/gitlabhq/pull/9008.

Fixes gitlab-org/gitlab-ce#1289.

cc @jacobvosmaer

See merge request !519
2015-04-15 12:40:30 +00:00
Dmitriy Zaporozhets 4ab22a8c32 Merge branch 'ldap-block_auto_created_users' into 'master'
Add config var to block auto-created LDAP users.

Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2110.

See merge request !522
2015-04-15 12:36:43 +00:00
Dmitriy Zaporozhets e3d818a4e8 Merge branch 'invitation' into 'master'
Allow users to be invited.

Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2058.

The "Add members" panes for both Group Members and Project Members have gained a line of text by the People field.

![Screen_Shot_2015-04-10_at_14.14.32](https://gitlab.com/gitlab-org/gitlab-ce/uploads/fe990e65eccd9203d7324b492941362b/Screen_Shot_2015-04-10_at_14.14.32.png)

Entering an email address that is not already a member will give you the option to invite them.

![Screen_Shot_2015-04-10_at_14.14.48](https://gitlab.com/gitlab-org/gitlab-ce/uploads/d6b0d4571ea90f2a2e4af8f5b336e8e1/Screen_Shot_2015-04-10_at_14.14.48.png)

Choosing the option will add them to the People field. This works the right way (TM) in combination with adding existing users as members.

![Screen_Shot_2015-04-10_at_14.15.09](https://gitlab.com/gitlab-org/gitlab-ce/uploads/a618e5ec292d79578b16400dca6d4cfe/Screen_Shot_2015-04-10_at_14.15.09.png)

The invited member will be shown in the members list as such. The access level can be changed, and the invite can be revoked by deleting the member.

![Screen_Shot_2015-04-10_at_14.15.19](https://gitlab.com/gitlab-org/gitlab-ce/uploads/3695b9a6778d367b275115747579b46e/Screen_Shot_2015-04-10_at_14.15.19.png)

The invited user will receive an email with an "Accept invitation" link.

![Screen_Shot_2015-04-10_at_14.17.52](https://gitlab.com/gitlab-org/gitlab-ce/uploads/730121888153117d83c3cd0e4f5c90f6/Screen_Shot_2015-04-10_at_14.17.52.png)

If they're not already logged in, clicking this link will redirect them to the sign in/up page with a helpful notice.

![Screen_Shot_2015-04-10_at_14.18.12](https://gitlab.com/gitlab-org/gitlab-ce/uploads/1a26a5fa13321e7ef77ed8b538c8557d/Screen_Shot_2015-04-10_at_14.18.12.png)

Signing in or signing up will redirect them back to the invite detail page, where they can actually accept the invitation, which will update the member record in question to point to the user in question.

![Screen_Shot_2015-04-10_at_14.18.48](https://gitlab.com/gitlab-org/gitlab-ce/uploads/7ac33085463a99b8cfa6baa13bfa1235/Screen_Shot_2015-04-10_at_14.18.48.png)

Accepting the invitation will redirect them to the group (or project) with an appropriate notice.

![Screen_Shot_2015-04-10_at_14.18.58](https://gitlab.com/gitlab-org/gitlab-ce/uploads/7bf02a2e3bea589a11df401c23e68648/Screen_Shot_2015-04-10_at_14.18.58.png)

As currently, they will also receive this information by email.

![Screen_Shot_2015-04-10_at_14.24.00](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b44a342068433a268c0a06ed9e791ffa/Screen_Shot_2015-04-10_at_14.24.00.png)

At the same time, the person who initially invited the email address is sent a notification as well, so they know of the new member and to tell them what name the user signed up with.

![Screen_Shot_2015-04-10_at_14.19.07](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b29fea128186f938ec76bd7dec016b83/Screen_Shot_2015-04-10_at_14.19.07.png)

The member row on the Members page will now have been updated with the new user account.

![Screen_Shot_2015-04-10_at_14.19.23](https://gitlab.com/gitlab-org/gitlab-ce/uploads/cf503d3d1679614e03acec2e946a28c3/Screen_Shot_2015-04-10_at_14.19.23.png)

See merge request !500
2015-04-15 10:48:28 +00:00
Douwe Maan 63b21945d2 Merge branch 'google-code-import' into 'master'
Import projects from Google Code.

Resolves #1257.

Issue import logic almost entirely taken from https://gitlab.com/o9000/google-code-to-gitlab ( ♥️ @o9000).

### To do

- [x] List projects from Google Takeout file
- [x] Import Git repository
- [x] Import issues
- [x] Link to correct attachment URL (https://code.google.com/p/support-tools/issues/detail?id=50)
- [x] Handle deleted attachments
- [x] Handle blockedOn attribute
- [x] Add directions on how to get data from Google Takeout

### Import instructions

![Screen_Shot_2015-04-03_at_16.02.21](https://gitlab.com/gitlab-org/gitlab-ce/uploads/4a87038035fbad9441cf613b8cdcc690/Screen_Shot_2015-04-03_at_16.02.21.png)

### Imported issue

![Screen_Shot_2015-04-03_at_16.25.49](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b2c2eaf5ecfcf57b3c48511eb5d26db4/Screen_Shot_2015-04-03_at_16.25.49.png)

See merge request !471
2015-04-15 06:53:42 +00:00
Douwe Maan 9d00bb0896 Import Google Code issue assignee when mapped. 2015-04-14 23:22:14 +02:00