Robert Speicher
79c4e3899f
Rename ReferenceFilterSpecHelper to FilterSpecHelper
...
And make it more generalized for all filter specs.
2015-06-02 13:27:53 -04:00
Robert Speicher
023dd2907b
Add a `pipeline` context option for SanitizationFilter
...
When this option is `:description`, we use a more restrictive whitelist.
This is used for Project and Group description fields.
2015-06-02 13:04:10 -04:00
Douwe Maan
94919c7ef6
Ignore references in blockquotes.
2015-06-02 13:17:21 +02:00
Douwe Maan
fe78984f20
Actually ignore references in code blocks etc.
2015-06-02 13:17:11 +02:00
Martins Polakovs
6181160504
Update mocking/stubbing syntax to the new RSpec 3 syntax
2015-05-30 19:15:10 +03:00
Robert Speicher
7424d2fa5b
Add ExternalLinkFilter to Markdown pipeline
...
Forces a `rel="nofollow"` attribute on all external links.
2015-05-27 15:39:08 -04:00
Robert Speicher
2c1bf71793
Fix ClosingIssueExtractor specs
2015-05-26 15:55:26 -04:00
Robert Speicher
5a9c5520d9
Make use of to_reference in more specs
2015-05-26 15:49:22 -04:00
Robert Speicher
81a09bc74c
Support only double quotes for multi-word label references
2015-05-26 15:49:20 -04:00
Robert Speicher
94af050117
Use `to_reference` in reference filter specs
2015-05-26 15:48:32 -04:00
Robert Speicher
136ab73803
Update CommitRange#to_reference to use full SHAs
...
We only want them shortened by the filter, which calls to_s
2015-05-26 15:48:31 -04:00
Dmitriy Zaporozhets
08102ad748
Merge branch 'rs-issue-1690' into 'master'
...
Better handle label references that aren't actually references
Fixes #1690
See merge request !705
2015-05-26 14:35:54 +00:00
Robert Speicher
b263a33c80
Better handle label references that aren't actually references
...
Fixes #1690
2015-05-25 16:06:34 -04:00
Martins Polakovs
cfc9bff45e
Fix upgrader script
2015-05-23 13:11:23 +03:00
Stan Hu
3b22cfe600
Remove Rack Attack monkey patches and bump to version 4.3.0
2015-05-22 16:25:03 -04:00
Robert Speicher
8ee382087d
Subclass TaskList::Filter to fix a bug
...
Instead of using a fork, we subclass the filter and only apply the
`task-list` class to list items that actually are task lists.
Closes #1645
See https://github.com/github/task_list/pull/60
2015-05-20 12:08:33 -04:00
Jakub Jirutka
b0659c1b07
Simplify and unify helpers for rendering markup
2015-05-18 22:52:13 +02:00
Jakub Jirutka
daa0925016
Rename MarkdownHelper to MarkupHelper
2015-05-18 22:51:56 +02:00
Jakub Jirutka
8dbc4746fe
Handle AsciiDoc better, reuse HTML pipeline filters ( fixes #9263 )
2015-05-18 20:48:03 +02:00
Robert Speicher
7f2fb72a0a
Minor RelativeLinkFilter cleanup
2015-05-13 14:08:37 -04:00
Dmitriy Zaporozhets
8ad91d5840
Merge branch 'text-batch-1' into 'master'
...
Batch 1 of text improvements
Batch 1 of changes from my effort at !635 to walk through every piece of text in GitLab and see if it can be improved.
This batch includes:
- Improve text on error pages.
- Improve Git access error messages.
- Improve description of branch protection levels.
- Improve OAuth signup error message.
- Improve OAuth application flash messages.
cc @rspeicher
See merge request !642
2015-05-13 12:05:17 +00:00
Dmitriy Zaporozhets
740716afd1
Merge pull request #9276 from jirutka/relative_link_filter
...
Extract handling of relative file links to its own HTML filter
2015-05-13 14:09:57 +03:00
Douwe Maan
c5e4b443ff
Fix GitAccess.
2015-05-13 09:46:22 +02:00
Douwe Maan
125cb9b866
Don't accidentally unblock auto created users from Active Directory.
2015-05-12 11:26:43 +02:00
Jakub Jirutka
44b82396d1
Add spec for RelativeLinkFilter
2015-05-12 02:12:47 +02:00
Robert Speicher
70bbf093aa
Remove class and id attributes from SanitizationFilter whitelist
2015-05-08 12:31:34 -04:00
Dmitriy Zaporozhets
644b4c97e9
Merge pull request #8756 from zaburt/force_utf8_on_oauth_properties
...
add common method to force utf8 and force oauth properties to be utf8
2015-05-03 14:25:36 +03:00
Onur Küçük
0ae574007d
add common method to force utf8 and force oauth properties to be utf8
2015-05-03 00:43:46 +03:00
Robert Speicher
0027c2ddd7
Add Project#get_issue
2015-04-30 16:35:27 -04:00
Robert Speicher
cd3c24a8f3
Autolink short URLs
2015-04-30 16:35:27 -04:00
Robert Speicher
f4fac3ac87
Add jira_project project factory
2015-04-30 16:35:27 -04:00
Robert Speicher
e46d1cdd8b
Add Gitlab::Markdown::SanitizationFilter
...
This just extends the HTML::Pipeline::SanitizationFilter with our custom
whitelist.
2015-04-30 16:35:25 -04:00
Robert Speicher
aa2cc670fe
Add Gitlab::Markdown::AutolinkFilter
2015-04-30 16:35:25 -04:00
Robert Speicher
382a0aa6ef
Add Gitlab::Markdown::TableOfContentsFilter
...
Removes header and table of contents processing from Redcarpet renderer.
2015-04-30 16:35:25 -04:00
Stan Hu
9c76a6fa96
Show incompatible projects in Google Code import status
...
Importing a JSON file with only one Subversion project lead to confusion
over whether the system was working. Provide status why these projects
could not be imported directly.
Closes #1531
2015-04-30 06:56:49 -07:00
Jakub Jirutka
a1c01bc19b
Fix (project_)name_regex to accept non-ASCII letters and dash
2015-04-27 16:38:47 +02:00
Robert Speicher
07a88040a4
Fix NotificationService spec
2015-04-25 16:46:06 -04:00
Robert Speicher
95ca6584d8
Add CommitRange directly to results Hash
2015-04-25 14:46:06 -04:00
Robert Speicher
6bac823ad4
Update CommitRangeReferenceFilter to use CommitRange class
...
Also matches CommitReferenceFilter's new behavior of always using short
SHAs in the link text.
2015-04-25 14:41:06 -04:00
Robert Speicher
2c8bfedb20
Always use short SHAs as commit reference link text
...
Now when a user pastes a full SHA like
`d7f61affaf845f44b4cc995e34eb1606c47c8eff`, its link text will only show
`d7f61aff` for brevity.
2015-04-25 14:40:40 -04:00
Robert Speicher
8f8a8ab32b
Refactor ReferenceExtractor to use pipeline filters
2015-04-25 14:40:12 -04:00
Robert Speicher
a6defd1576
Add results to reference filters
2015-04-25 14:39:45 -04:00
Douwe Maan
8ed7ac9d44
Use project.commit convenience method.
2015-04-24 12:29:36 +02: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
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
c52bf4ad3c
Tweak single-word label regex to fix pending spec.
2015-04-20 13:01:47 -04:00
Douwe Maan
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
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
Dmitriy Zaporozhets
acc312fc25
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce
2015-02-20 13:54:21 -08:00
Dmitriy Zaporozhets
92434b29cc
Extend project web hooks with more data
...
* add git_http_url and git_ssh_url to project web hook
* add visibility_level to project web hook
* add documentation about project visibility_level in API
2015-02-20 10:27:37 -08:00
Marcin Kulik
157b4b4b1f
Add gitorious.org importer
2015-02-20 17:42:58 +00:00
Vinnie Okada
76aad9b76e
Upgrade to Rails 4.1.9
...
Make the following changes to deal with new behavior in Rails 4.1.2:
* Use nested resources to avoid slashes in arguments to path helpers.
2015-02-14 11:09:23 -07:00
Dmitriy Zaporozhets
529188e478
Merge branch 'master' of github.com:gitlabhq/gitlabhq
2015-02-12 16:47:52 -08:00
Douwe Maan
6685661b54
Clean username acquired from OAuth/LDAP.
...
Fixes #1967 .
2015-02-12 21:05:27 +01:00
Jeroen van Baarsen
0c4a70a306
Updated rspec to rspec 3.x syntax
...
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:17:35 +01:00
Douwe Maan
fd21d72b1b
Extend issue closing pattern.
2015-02-08 13:56:12 +01:00
Valery Sizov
7ddba92a39
Gitlab integration: added tests
2015-02-05 12:50:34 -08:00
Dmitriy Zaporozhets
ca701a9649
Improvements to LDAP::User model
...
* method #changed? also tracks changes of identites (fixes issue with email mapping)
* find ldap identity before initialize one
2015-01-29 13:28:41 -08:00
Marin Jankovski
9b5b334a79
Remove unused feature steps.
2015-01-26 16:04:08 -08:00
Dmitriy Zaporozhets
0c4bb84910
Merge pull request #7762 from jubianchi/commit-closing-issues
...
Allow commit messages to close several issues at once
2015-01-21 11:49:13 -08:00
Valery Sizov
ab7a79bf3b
developer can push to protected branches
2015-01-20 17:34:23 -08:00
jubianchi
b21a2d821a
Allow commit messages to close several issues at once (thanks @123Haynes
...
for his work and help)
2015-01-20 10:45:48 +01:00
Dmitriy Zaporozhets
de27375d6c
Test git builder over annotated tag
2015-01-15 11:17:47 -08:00
Dmitriy Zaporozhets
bb1f8b1d8b
Merge branch 'github_importer'
...
Conflicts:
app/helpers/projects_helper.rb
2015-01-13 10:35:16 -08:00
Dmitriy Zaporozhets
3197044512
Refactor push data builder. Moved it to separate class
...
Also execute GitLab CI on creating tag via UI
2015-01-11 23:51:31 -08:00
Valery Sizov
a9f7fd2c1a
Github Importer
2015-01-10 09:51:43 -08:00
Marin Jankovski
84af3ceb9b
Add spec for developers can push to protected branches.
2014-12-26 11:41:04 +01:00
Valery Sizov
f9a730ebb4
fix specs
2014-12-04 15:53:26 +02:00
Valery Sizov
3a5ed5260b
Supporting for multiple omniauth provider for the same user
2014-12-04 13:03:55 +02:00
Dmitriy Zaporozhets
06b7907c2a
Fix deploy keys permission check in internal api
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-12-01 16:25:10 +02:00
Valery Sizov
ef944e83ec
Git hook messages: wiki access fix
2014-11-24 16:21:35 +02:00
Valery Sizov
53bf52f191
Better message for failed pushes because of git hooks
...
Conflicts:
lib/gitlab/git_access.rb
spec/lib/gitlab/git_access_spec.rb
2014-11-18 13:10:07 +02:00
Dmitriy Zaporozhets
876c6f2491
Merge branch 'master' of github.com:gitlabhq/gitlabhq
2014-11-04 10:48:38 +02:00
Ciro Santilli
71ed0ab069
Fix push not allowed to protected branch if
...
commit starts with 7 zeros.
2014-11-03 20:37:47 +01:00
Andrey Krivko
bafd30f92c
Session API: Use case-insensitive authentication like in UI
2014-10-30 18:29:18 +02:00
Jacob Vosmaer
472a6621e9
Fix LDAP config lookup for provider 'ldap'
2014-10-23 22:57:16 +02:00
Dmitriy Zaporozhets
f8cdd62e22
Fix account existing blocking
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-10-17 14:08:02 +03:00
Jan-Willem van der Meer
d9bfebc0e8
Add regressiontest to verify allow_single_sign_on setting
...
verification for #1677
Since testing omniauth_callback_controller.rb is very difficult, the logic
is moved to the models
2014-10-16 20:08:30 +02:00
Jan-Willem van der Meer
fad588f2be
Remove LDAP save test
...
This is handled within the LDAP class
2014-10-16 17:18:40 +02:00
Jan-Willem van der Meer
23b692c701
Add specs for authentication and config
2014-10-14 09:31:38 +02:00
Jan-Willem van der Meer
5e1c39cb78
Merge tests to support Multiple LDAP groups
2014-10-13 17:33:44 +02:00
Jan-Willem van der Meer
01b791237c
Refactor lib files for multiple LDAP groups
2014-10-13 17:24:05 +02:00
Jan-Willem van der Meer
d059f50d4c
Refactor OAuth refactorings to CE
2014-10-10 12:03:32 +02:00
Dmitriy Zaporozhets
0bf99f6557
Developers can push to wiki repo. Protected branches does not affect wiki repo any more
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-10-07 16:05:24 +03:00
Vinnie Okada
2c46c4523f
Track projects in ReferenceExtractor
...
Store both the project and identifier of extracted references. This
prevents `ReferenceExtractor` from returning objects in the wrong
project for cross-project references.
2014-10-03 12:30:20 -05:00
Ciro Santilli
2e9f5de868
Add parenthesis to function def with arguments.
2014-10-03 09:18:46 +02:00
Marin Jankovski
f7aba277e7
Add option to gitlab config to specify if LDAP server is active directory.
2014-09-30 12:07:31 +02:00
Dmitriy Zaporozhets
15ba6ea105
Refactor Gitlab::GitAccess tests
2014-09-24 12:04:40 +03:00
Dmitriy Zaporozhets
3aa7132adc
Add GitAccess specs
2014-09-24 11:37:30 +03:00
Jacob Vosmaer
d5c81a8d4a
Merge pull request #7692 from mr-vinn/fix-spec-rm
...
Use FileUtils to delete instead of File
2014-09-23 11:23:47 +02:00
Vinnie Okada
8ec602e64f
Fix invalid method in test
...
Use FileUtils::rm_f to delete the satellite lock file.
2014-09-22 11:50:27 -05:00
Jan-Willem van der Meer
bf0de1a500
Merge remote-tracking branch 'origin/master' into feature-oauth-refactoring
2014-09-11 11:46:08 +02:00
Dmitriy Zaporozhets
218219abbd
Refactoring inside refactoring. We need to go deeper
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-08 21:54:52 +03:00
Dmitriy Zaporozhets
bde3f25d26
Specs for diff parser! Yay!
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-08 20:42:12 +03:00
Jan-Willem van der Meer
11bb67c3c6
Test authenticate method for Gitlab::LDAP::User
2014-09-08 14:53:59 +02:00
Jan-Willem van der Meer
f27830fa4c
Ensure Gitlab::LDAP::authentication is tested
2014-09-08 13:26:25 +02:00
Jan-Willem van der Meer
f88b6d0330
Refactor gitlab auth tests
2014-09-08 13:11:39 +02:00
Jan-Willem van der Meer
5b86dab03b
Move auth hash to a seperate class
2014-09-04 12:55:10 +02:00
Jan-Willem van der Meer
c0323b40ee
Refactor: beter naming for active directory disabled users
2014-09-01 16:35:18 +02:00
Jan-Willem van der Meer
26b14dd2d5
Get uid from auth instead of info hash
...
As found in the omniauth specs: https://github.com/intridea/omniauth/wiki/Auth-Hash-Schema
2014-09-01 16:31:27 +02:00
Jan-Willem van der Meer
92a9964940
Add basic find / create specs for LDAP user
2014-09-01 15:30:46 +02:00
Jan-Willem van der Meer
262276c5f5
Ensure oath callbacks without a nickname work (google)
2014-09-01 14:26:10 +02:00
Jan-Willem van der Meer
5801d520a7
Handle user creation if email is not provided
...
This fixes #1541
2014-09-01 14:05:01 +02:00
Jan-Willem van der Meer
0ec4abf73c
Use local vars for tests
2014-09-01 13:02:41 +02:00
Jan-Willem van der Meer
0c34fa3ea0
Add tests for finding an oauth authenticated user
2014-09-01 12:59:04 +02:00
Dmitriy Zaporozhets
14f5199cdc
Merge branch 'feature-ldap-tests' into 'master'
...
Feature ldap tests
Move specs to proper places. Relates to #154
This is already mergeable, will continue in a new branch for additions & refactorings.
See merge request !1053
2014-08-30 07:16:45 +00:00
Jan-Willem van der Meer
0d5ae2802e
Move and rename ldap / oauth specs
2014-08-29 17:30:42 +02:00
Jan-Willem van der Meer
97547428bd
Rename ldap tests even further
2014-08-29 16:04:00 +02:00
Jacob Vosmaer
614ca3ec65
Remove LDAP::Access#find_user
...
This method existed to allow LDAP users to take over existing GitLab
accounts if the part before the '@' of their LDAP email attribute
matched the username of an existing GitLab user. I propose to disable
this behavior in order to prevent unintended GitLab account takeovers.
After this change it is still possible to take over an existing GitLab
account with your LDAP credentials, as long as the GitLab account email
address matches the LDAP user email address.
2014-08-29 15:38:05 +02:00
Jan-Willem van der Meer
6840a276d5
Fix naming convention of LDAP tests
2014-08-29 13:49:01 +02:00
Robert Schilling
99eb283101
Use readme we support to render if there are multiple readmes
2014-08-11 08:50:56 +02:00
Dmitriy Zaporozhets
8f1e60b057
Fix satellite tests
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-08-06 09:52:56 +03:00
Dmitriy Zaporozhets
c23e1f3d41
Fix test
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-24 12:48:47 +03:00
Ayrton Araújo
07537faca7
Add support to set satellites timeout
2014-07-21 11:50:29 -04:00
Dmitriy Zaporozhets
6a0cb25096
Dont allow ? in project path
...
Because it causes 500 error on every page where link to such project
exists
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-08 18:15:23 +03:00
Jeroen van Baarsen
8880c55a1e
Fixed the spec
...
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2014-06-14 09:27:11 +02:00
Jeroen van Baarsen
87760a290e
Added an UrlBuilder for building rails named routes
...
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2014-06-13 12:34:15 +02:00
Jacob Vosmaer
be1120e968
Improve ad_disabled method name
2014-05-14 19:13:06 +02:00
Jacob Vosmaer
d54133b09f
Add spec for LDAP::Access#allowed?
2014-05-14 18:26:49 +02:00
Jacob Vosmaer
982d4d51e8
Backport Adapter#dn_matches_filter? from EE
2014-05-14 18:11:14 +02:00
Marin Jankovski
6b04a5f910
Add support for Jira ticket mentions in format JIRA-123.
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Conflicts:
CHANGELOG-EE
2014-05-13 15:33:38 +03:00
Dmitriy Zaporozhets
e1dd76d5a5
Fix tests that dont respect project-fork relation. pt2
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-03 11:49:12 +03:00
Dmitriy Zaporozhets
3e864036e7
Fix ldap_user_auth_spec
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-03-10 19:16:43 +02:00
Jacob Vosmaer
8016cefafe
Make the Gitlab::Popen path argument optional
2014-02-25 11:58:22 +01:00
Jacob Vosmaer
0432bdf19e
Change Gitlab::Popen to use arrays for commands
2014-02-25 11:57:42 +01:00
Marin Jankovski
54bcb6cc2a
Merge branch 'master' into reference_relative_links
...
Conflicts:
spec/models/project_spec.rb
2014-01-24 14:02:11 +01:00
Marin Jankovski
d819d0d1f8
Use the correct paths.
2014-01-23 16:00:39 +01:00
Dmitriy Zaporozhets
28e13634dc
Merge branch 'improve/mr_diff'
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Conflicts:
features/steps/project/project_fork.rb
features/steps/project/project_forked_merge_requests.rb
features/steps/project/project_issue_tracker.rb
features/steps/project/project_markdown_render.rb
features/steps/shared/project.rb
2014-01-23 14:38:23 +02:00
Dmitriy Zaporozhets
4cde3593b9
Fix satellites specs
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-23 13:21:58 +02:00
Dmitriy Zaporozhets
c227aa44f9
Make changes to tests
...
* project_with_code -> project
* project -> ermpty_project
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-22 21:03:52 +02:00
skv
a3f645ef51
Remove deprecated finders
2014-01-19 23:39:56 +04:00
Dmitriy Zaporozhets
6a80083294
Use same code for diff and patch inside MergeAction
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-01-13 16:16:45 +02:00
skv
d89527839e
fix most of warnings
2013-12-15 00:05:10 +04:00
Dmitriy Zaporozhets
440f3f384f
Minor version upgrader
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-12-13 15:18:57 +02:00
Marin Jankovski
f40e0171db
Test if markdown is rendered properly.
2013-10-11 13:44:00 +02:00
Izaak Alpert
75b2ff8f43
Added ldap tests
...
Change-Id: Ifd77615b3b92d7d8bca92b8875aa8204356cfd85
2013-09-22 20:25:47 -04:00
ash wilson
c8a115c0e3
Link issues from comments and automatically close them
...
Any mention of Issues, MergeRequests, or Commits via GitLab-flavored markdown
references in descriptions, titles, or attached Notes creates a back-reference
Note that links to the original referencer. Furthermore, pushing commits with
commit messages that match a (configurable) regexp to a project's default
branch will close any issues mentioned by GFM in the matched closing phrase.
If accepting a merge request would close any Issues in this way, a banner is
appended to the merge request's main panel to indicate this.
2013-08-25 18:58:41 -04:00
Izaak Alpert
7856fba362
Updated format_patch to use '..' rather than '...'
...
Was incorrectly including commits reachable from rev2.
Change-Id: I3560e5d5ce474ba3d374f29ae16190b1f74989be
2013-07-30 16:13:01 -04:00
Izaak Alpert
5806402740
Raise Error for diff_between/commit_between for non fork mr's in satellite
...
-Fixed tests to account for this
-Trigger update after update_branches for list:update selecting first commit, have it also trigger sha lookup
Change-Id: Ie4c3d4fbf57aeadd7d141d3704f4ea0f0684a7a5
2013-07-17 22:48:03 -04:00
Izaak Alpert
d99594273d
Style changes from review with @randx
...
-Some changes around calling origional methods for !for_fork? merge requests. Other changes to follow
Change-Id: I009c716ce2475b9efa3fd07aee9215fca7a1c150
2013-07-17 22:48:03 -04:00
Izaak Alpert
5d56da6bdd
MR on fork: Some cleanup, test updates
...
-The forked merge request test now tests it's componenets again, and seems to work every time (did this by reordering the branch updates so their is more time for update_branches to run) -- this could still technically fail, but after several runs it doesn't seem to.
-Removed todo in merge_request, pushed wrapping of grit down to the satellite
-updated action test to check flock status, made it nolonger pending
-moved all logging on failure to helper method in satellite
GITLAB-592
Change-Id: If0554ca35eedc3d3e8461f7d93d4b3939fa2cd75
2013-07-17 22:42:51 -04:00
Izaak Alpert
489fa5d726
MR on Fork multiple fixes
...
-Disable observers post test run
-Allow db:seed_fu RAILS_ENV=test to be run more than once without error
-fix diffs_in_between, was passing in the default_options for grit, but grit in this case doesn't take options, fixed the test to actually fail if the incorrect diffs are returned
-make notes/commits render against proper project
-MR discussion file links should reference note's project
-Added tests for commit links on edit merge request
-fixes edit issues (canceling an edited mr, updating an edited mr)
-updates tests with checks for source code updates
-still forked_merge_requests.feature (project_forked_merge_requests) test not passing (commented out -- "stable" not being set)
MR API: error on bad target_project
-If the target project id is specified and it is not the same as the project the request is being made on (the source), and the it isn't a fork of that project, error out, otherwise use it as the target
-Fixes some busted (but hidden) test cases
Conflicts:
app/views/merge_requests/show/_diffs.html.haml
spec/features/notes_on_merge_requests_spec.rb
Change-Id: I20e595c156d0e8a63048baaead7be6330c738a05
2013-07-17 22:42:51 -04:00
Izaak Alpert
3d7194f011
Merge Request on forked projects
...
The good:
- You can do a merge request for a forked commit and it will merge properly (i.e. it does work).
- Push events take into account merge requests on forked projects
- Tests around merge_actions now present, spinach, and other rspec tests
- Satellites now clean themselves up rather then recreate
The questionable:
- Events only know about target projects
- Project's merge requests only hold on to MR's where they are the target
- All operations performed in the satellite
The bad:
- Duplication between project's repositories and satellites (e.g. commits_between)
(for reference: http://feedback.gitlab.com/forums/176466-general/suggestions/3456722-merge-requests-between-projects-repos )
Fixes:
Make test repos/satellites only create when needed
-Spinach/Rspec now only initialize test directory, and setup stubs (things that are relatively cheap)
-project_with_code, source_project_with_code, and target_project_with_code now create/destroy their repos individually
-fixed remote removal
-How to merge renders properly
-Update emails to show project/branches
-Edit MR doesn't set target branch
-Fix some failures on editing/creating merge requests, added a test
-Added back a test around merge request observer
-Clean up project_transfer_spec, Remove duplicate enable/disable observers
-Ensure satellite lock files are cleaned up, Attempted to add some testing around these as well
-Signifant speed ups for tests
-Update formatting ordering in notes_on_merge_requests
-Remove wiki schema update
Fixes for search/search results
-Search results was using by_project for a list of projects, updated this to use in_projects
-updated search results to reference the correct (target) project
-udpated search results to print both sides of the merge request
Change-Id: I19407990a0950945cc95d62089cbcc6262dab1a8
2013-07-17 22:41:30 -04:00
Dmitriy Zaporozhets
1b3b90dbfd
Remove teams specs
2013-06-18 22:06:20 +03:00
Dmitriy Zaporozhets
f1e0d37b15
Its better to load graph with ajax since it requires ~10 seconds for bigger projects to finish up
2013-06-05 15:50:11 +03:00
Karlo Soriano
71d67e6557
Contributors graphs feature for GitLab
...
Created tests and refactored some code along the way
Added stat graph util spec, refactored code
finsihed up tests and refactors
finsihed up tests and refactors
2013-06-05 16:51:48 +08:00
Andrey Kumanyaev
08c2c94d46
Fix bug with team assignation on project from #4109
2013-06-01 19:24:15 +04:00
Sato Hiroyuki
862e0ff6b8
Add Gitlab::VersionInfo class to fix and simplify version check.
...
It returns "yes" if required version is "1.7.10" and current version is "1.6.10",
because the patch version of current version equals to that of required version.
2013-05-08 17:36:48 +09:00
Dmitriy Zaporozhets
f40d4e6685
Merge pull request #3597 from amacarthur/fork-pull-request
...
updated fork feature to use gitlab-shell for v5 of gitlab
2013-05-02 23:41:07 -07:00
Dmitriy Zaporozhets
4f2d2c90f7
Move Gitlab::Git out of gitlab core
2013-04-27 23:50:17 +03:00
Dmitriy Zaporozhets
211c433cd8
Gitlab::Git::Stats specs
2013-04-16 16:39:48 +03:00
Dmitriy Zaporozhets
be41d0e1bf
Gitlab::Git::Diff specs
2013-04-16 16:30:16 +03:00
Angus MacArthur
ae33fdf297
updated fork feature to use gitlab-shell for v5 of gitlab
2013-04-15 01:54:52 -04:00
Dmitriy Zaporozhets
c3bbbff673
specs for repository tag_names, branch_names
2013-04-03 21:21:24 +03:00
Dmitriy Zaporozhets
f8a4a76048
decorate commits in Gitlab::Git::repository with valid class
2013-04-03 21:17:50 +03:00
Dmitriy Zaporozhets
e91ff84df7
keep same dir structure for specs as in lib/
2013-04-03 21:09:07 +03:00