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 Maan and Robert Speicher
c52bf4ad3c
Tweak single-word label regex to fix pending spec.
2015-04-20 13:01:47 -04:00
Douwe Maan and Robert 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.

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

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

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.

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

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

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.

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

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

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.

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

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

### Imported issue

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