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
0c650dc0e2
Update Google Code importer test.
2015-04-21 10:36:43 +02:00
Robert Speicher
b389424627
Skip failing test until usernames can't end in periods again
2015-04-20 13:01:47 -04: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
3a0b4340aa
Add more tests for cross-project references
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
a3c71d9898
Add spec for ReferenceExtractor#labels
2015-04-20 13:01:46 -04:00
Robert Speicher
5b6c1a2182
Fix Issue and ExternalIssue reference specs
2015-04-20 13:01:45 -04:00
Robert Speicher
b0ea7b3b3d
Fix cross-project reference specs for new permission check
...
For simplicity's sake, since we're testing the actual referencing, we
just force the permission check to always be allowed.
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
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
bc7c35cca0
Fix ReferenceExtractor spec
2015-04-20 13:01:43 -04:00
Robert Speicher
4cb1cc2b64
Make CommitRange and Snippets cross-referable
2015-04-20 13:01:42 -04:00
Robert Speicher
d520fe07ad
Fix GitlabMarkdownHelper spec
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
7d98c8842d
Move import data out of project so it doesn't take ages to load.
2015-04-17 14:49:00 +02: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
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
Douwe Maan
238e4f0295
Add config var to block auto-created LDAP users.
2015-04-14 17:09:05 +02:00
Douwe Maan
dba63d667d
Allow user map to be specified.
2015-04-14 14:50:56 +02:00
Douwe Maan
f6cb42f3d1
Add comment number to imported Google Code comments.
2015-04-14 13:13:18 +02:00
Douwe Maan
dfe659c16d
Remove author link since all code.google.com links will be shut down.
2015-04-14 13:11:29 +02:00
Douwe Maan
1221bec56c
Refactor key fingerprint generation.
2015-04-14 12:00:43 +02:00
Dmitriy Zaporozhets
4ab717ea6a
Merge branch 'ldap_migration'
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
Conflicts:
db/schema.rb
2015-04-13 17:18:02 +03:00
Dmitriy Zaporozhets
ecb58dacd6
Merge branch 'reference-access-control' into 'master'
...
Only allow users to reference groups, projects, issues, MRs, commits they have access to.
Addresses https://dev.gitlab.org/gitlab/gitlabhq/issues/2183 .
See merge request !1742
2015-04-13 14:10:25 +00:00
Jacob Vosmaer
65a3928b0b
Remove test for 'ldap' provider special case
2015-04-13 12:58:10 +02:00
Robert Speicher
2cefdbb535
Move lib/gitlab/oauth to lib/gitlab/o_auth
...
Lets Rails autoload these files by name
2015-04-09 14:19:24 -04:00
Douwe Maan
06399b3261
Show Google Code image attachments inline.
2015-04-04 14:19:05 +02:00
Douwe Maan
16e1076e6f
Update tests.
2015-04-03 18:03:34 +02:00
Douwe Maan
e8fb197da2
Fix tests.
2015-04-03 17:09:15 +02:00
Douwe Maan
7b5bc32cad
Allow projects to be imported from Google Code.
2015-04-03 15:29:27 +02:00
Douwe Maan
c5d7660000
Fix errors.
2015-04-02 22:36:54 +02:00
Douwe Maan
1d829ca151
Fix tests.
2015-03-27 11:10:56 +01:00
Dmitriy Zaporozhets
8f3f6e9efb
Merge branch 'api-internal-errors' into 'master'
...
Respond with full GitAccess error if user has project read access.
Should help with debugging #1236 .
cc @marin
See merge request !437
2015-03-25 04:16:45 +00:00
Douwe Maan
4830b2be5e
Refactor GitAccess to use instance variables.
2015-03-24 14:11:48 +01:00
Stan Hu
56d87db32c
Reduce Rack Attack false positives by clearing out auth failure count upon
...
successful Git over HTTP authentication.
Add logging when a ban goes into effect for debugging.
Issue #1171
2015-03-24 00:36:46 -07:00
Stan Hu
5cce0645b0
Fix OAuth2 issue importing a new project from GitHub and GitLab
...
Closes #1268
2015-03-22 18:16:48 -07:00
Dmitriy Zaporozhets
fb30039668
Merge branch 'disable-ref-generation-in-code-blocks' into 'master'
...
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
2015-03-22 23:36:07 +00:00
Stan Hu
83d552d50d
Disable reference creation for comments surrounded by code/preformatted blocks
2015-03-19 14:37:35 -07:00
Stan Hu
fad71576f9
Fix cross references when usernames, milestones, or project names contain underscores.
...
Remove emphasis from system notes to avoid Markdown conflicts in names.
2015-03-19 07:07:30 -07:00
Douwe Maan
8fed435208
Unblock user if they were unblocked in AD.
2015-03-13 22:34:11 +01:00
Dmitriy Zaporozhets
e7f4f0ae1d
Block user if he/she was blocked in Active Directory
2015-03-12 11:53:21 -07:00
Douwe Maan
4dddaef866
Automatically link commit ranges to compare page.
2015-03-07 00:46:13 +01:00