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
Stan Hu
7e204cf389
Added comment notification events to HipChat and Slack services.
...
Supports four different event types all bundled under the "note" event type:
- comments on a commit
- comments on an issue
- comments on a merge request
- comments on a code snippet
2015-03-06 06:54:00 -08:00
Marin Jankovski
3d6d0e1e77
Merge branch 'fix-namespace-merge-request-url' into 'master'
...
Fix namespace in merge request url building
Changes in 42387b733b now require namespace specification and broke abc69c8905 .
There are additional helper functions in c530ca00b0 , but this seemed easier not to rely on them.
See merge request !363
2015-03-04 01:08:52 +00:00
Stan Hu
2088cee935
Fix URL builder to use GitlabRoutingHelper
2015-03-03 15:57:28 -08:00
Dmitriy Zaporozhets
8c47a72a4e
Merge branch 'project-existence-leak' into 'master'
...
Don't leak information about private project existence via Git-over-SSH/HTTP.
Fixes #2040 and https://gitlab.com/gitlab-org/gitlab-ce/issues/343 .
Both `Grack::Auth` (used by Git-over-HTTP) and `Api::Internal /allowed` (used by gitlab-shell/Git-over-SSH) now return a generic "Not Found" error when the project exists but the user doesn't have access to it.
See merge request !1578
2015-03-03 20:05:12 +00:00
Jeroen van Baarsen
abc69c8905
Merge branch 'fix-merge-request-url-builder' into 'master'
...
Fix merge request URL passed to Webhooks
If you look at the data structure passed to Webhooks, you will see:
`"url"=>nil`
I don't think any of the Webhooks or services are using this yet, so right now nothing so far depends upon this value being correct.
See merge request !352
2015-03-03 13:18:23 +00:00
Douwe Maan
0e11be40c3
Add tests for GrackAuth.
2015-03-03 10:49:28 +01:00
Douwe Maan
ad6d623234
Add Bitbucket importer.
2015-02-24 15:07:24 +01:00
Stan Hu
e363f2e675
Fix merge request URL passed to Webhooks.
...
Previously the symbol "url" in the object_attributes hash would always be nil.
2015-02-24 06:51:24 +00:00
Vinnie Okada
2a9eed6620
Merge branch 'master' into rails-4.1.9
...
Conflicts:
app/views/projects/commits/_commit.html.haml
app/views/projects/issues/_issue.html.haml
app/views/projects/issues/_issue_context.html.haml
app/views/projects/merge_requests/_merge_request.html.haml
app/views/projects/merge_requests/show/_context.html.haml
2015-02-21 12:55:28 -07:00