Commit Graph
1899 Commits
Author SHA1 Message Date
Jan-Willem van der Meer 757d9aacb5 Call the correct authentication method 2014-10-10 15:02:31 +02:00
Jan-Willem van der Meer 89ac11df5c Merge branch 'feature-multi-ldap-servers' into feature-multiple-ldap-push-authentication 2014-10-10 12:22:46 +02:00
Jan-Willem van der Meer f06a60e2ad Merge branch 'feature-refactor-oauth-instance-methods' into feature-multi-ldap-servers 2014-10-10 12:05:11 +02:00
Jan-Willem van der Meer 9a1573b2dc More usefull errors if saving fails 2014-10-10 11:56:20 +02:00
Jan-Willem van der Meer 492398a6c6 Clearly distance ourselfs from AR methods 2014-10-10 11:44:04 +02:00
Jan-Willem van der Meer 049ae5b331 Clearly distance ourselfs from AR methods 2014-10-10 11:42:49 +02:00
Jan-Willem van der Meer 74e79105cd Cleanup provider validation 2014-10-10 11:31:33 +02:00
Jan-Willem van der Meer 824aeacdd7 Only allow valid LDAP::Config instances.
When trying to instantiate a new, but unknown provider, guidance is provided to get the correct provider

RuntimeError: Unknown provider (henk). Available providers: ["ldapmain"]
2014-10-10 11:25:35 +02:00
Jan-Willem van der Meer 8271fac0a9 Make AD check for access work properly 2014-10-10 10:46:07 +02:00
Jan-Willem van der Meer adee309127 Better description for new LDAP options 2014-10-10 10:10:39 +02:00
Jan-Willem van der Meer 53816ef8f3 Make AD check server specific 2014-10-10 10:07:37 +02:00
Jan-Willem van der Meer 19d811e6bf Make LDAP authentication work with multiple LDAP servers 2014-10-09 19:09:36 +02:00
Jan-Willem van der Meer 6373c84d5f Merge remote-tracking branch 'origin/master' into feature-multi-ldap-servers
Conflicts:
	app/models/user.rb
	config/gitlab.yml.example
	spec/lib/gitlab/ldap/access_spec.rb
2014-10-09 12:26:19 +02:00
Jan-Willem van der Meer 797ac2d60f Make authentication backwards compatible with multiple LDAP servers
Note: authentication agains an other server, other then the first
still does not work. This will be completed in further MR's
2014-10-09 08:54:55 +02:00
Jan-Willem van der Meer ddb46f48f3 Explain auth logic some more 2014-10-08 16:09:29 +02:00
Jan-Willem van der Meer 6059e0683a Make ldap/groups API call backwards compatible
It now just returns the results of the first server. A new call will replace
the existing to get results for a specific provider
2014-10-08 16:03:11 +02:00
Jan-Willem van der Meer f8c8ae29a2 Use LDAP::Config in all of the adapter methods 2014-10-08 15:33:50 +02:00
Jan-Willem van der Meer 212b406f49 Rename ssh_sync_key to old convention to prevent confusion 2014-10-08 15:24:15 +02:00
Jan-Willem van der Meer e972ac691b Remove binding.pry 2014-10-07 17:27:56 +02:00
Jan-Willem van der Meer 1bc99369dc Adapt tests to refactoring
- Use smarter instance methods
- Support multiple LDAP servers
2014-10-07 17:25:13 +02:00
Jan-Willem van der Meer 4ef74844c3 Adapt to new LDAP::Config class 2014-10-07 12:31:30 +02:00
Jan-Willem van der Meer e151bbbb28 Extract LDAP config to seperate class 2014-10-07 12:22:16 +02:00
Jan-Willem van der Meer e23a26aea0 Add provider context to Ldap::Access 2014-10-03 17:27:35 +02:00
Jan-Willem van der Meer 0e276f9cbf Move allowed call to LDAP::User 2014-10-03 17:27:14 +02:00
Jan-Willem van der Meer ce22ffbc7f Reuse the ldap adapter 2014-10-03 17:21:38 +02:00
Jan-Willem van der Meer e08c14c0f0 Use provider based ldap config 2014-10-03 17:18:25 +02:00
Jan-Willem van der Meer 63132b7513 Enable provider based LDAP adapter 2014-10-03 17:16:12 +02:00
Dmitriy Zaporozhets eafac5932f Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into ee-7-4
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	app/helpers/merge_requests_helper.rb
	doc/update/README.md
	lib/gitlab/reference_extractor.rb
2014-10-03 16:18:40 +03:00
Dmitriy Zaporozhets 778923b66c Merge branch 'ee-7-4' into 'master'
Recent 7.4 code from CE into EE

Fixes #187

See merge request !190
2014-10-03 12:29:35 +00:00
Jan-Willem van der Meer a6422e271e Add TODO for further refactoring 2014-10-03 14:01:06 +02:00
Dmitriy Zaporozhets 9afa80bbae Fix EE code after membership refactoring
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-10-03 14:09:07 +03:00
Dmitriy Zaporozhets ac6f032122 Merge pull request #7779 from Bugagazavr/hook_tag_push_events
Add tag push events to project hook api
2014-10-03 13:38:56 +03:00
Sytse Sijbrandij 0cc30145f4 Merge pull request #7664 from bbodenmiller/patch-2
add HSTS Policy warning
2014-10-03 12:12:23 +02:00
Ciro Santilli 2e9f5de868 Add parenthesis to function def with arguments. 2014-10-03 09:18:46 +02:00
Kirill Zaitsev b4963e9dda Add tag_push_events to project hook api 2014-10-03 10:23:32 +04:00
Dmitriy Zaporozhets a5972170ad Merge remote-tracking branch 'origin/master' into ee-7-4
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

Conflicts:
	app/controllers/projects/team_members_controller.rb
	app/finders/projects_finder.rb
	app/models/group.rb
	app/models/project_team.rb
	app/models/users_group.rb
	config/gitlab.yml.example
	config/initializers/1_settings.rb
	config/routes.rb
	db/schema.rb
	doc/integration/ldap.md
	features/steps/group.rb
	features/steps/project/project.rb
2014-10-02 13:24:59 +03:00
Dmitriy Zaporozhets 2478fecae6 Merge branch 'backup_fail_hard' into 'master'
Fail harder in the backup script

See merge request !1143
2014-10-02 09:28:23 +00:00
Dmitriy Zaporozhets 6c3ad0dab6 Merge pull request #7853 from Razer6/feature/html_pipeline
Factor out Emoji parsing using html-pipeline-gitlab
2014-10-02 11:18:40 +03:00
Jacob Vosmaer 02bf992f37 Fail harder in the backup script
This change also shows the output of failed Git commands during the
backup.
2014-10-01 15:43:27 +02:00
Jan-Willem van der Meer ad1c2f79d9 Refactor Gitlab::LDAP::User to instance methods 2014-10-01 14:11:50 +02:00
Dmitriy Zaporozhets ca1c35aa51 Merge branch 'fork-via-API' into 'master'
API: Add support for forking a project via the API

This adds an API call to create a fork of a project.

Such API "fork button" has been requested by feature requests summing up with 37 votes.

The GitLab user has flagged one of them as accepting merge/pull requests for this feature.

Motivation:

The ability to create a fork is missing in the API.
(The API currently only supports adding and removing the "forked" relationship between two existing projects)

This feature (create fork thru the API) feature has been requested via two feature requests:

15 votes, 13 comments: to be able to fork a project through the API
http://feedback.gitlab.com/forums/176466-general/suggestions/4125380-to-be-able-to-fork-a-project-through-the-api (it was marked as completed in error by referring to the much more special change which allows to add&delete fork information)

22 votes, 3 comments: add a "fork project" API call that acts like the "fork button"
http://feedback.gitlab.com/forums/176466-general/suggestions/5820264-add-a-fork-project-api-call-that-acts-like-the

The implementation is described in the text of the commit message (click on the "..." field to open it).

A comprehensive test suite is added as well: It covers all 5 success / failure modes:
1. Success case
2. Failure if authenticated user has no access the the project to be forked
3. Failure if the forked project already exists in the authenticated user's namespace
4. Failure if the forked project does not exist
5. Failure if not authenticated

Documentation for the new API call is added to the project help page: doc/api/projects.md

I have 2 additional merge requests in progress, one is based on this feature and extend it, the other is related to querying forks.

The merge request that would be directly related is based on a request written comment of one of the feature requests (that was independently also requested in a but entry):
The ability to fork a project (thru the API) to a given namespace, eg. a group, in one case, for trainings.

As this request does not change code, but only adds a new request API for creating forks, it does not have
the capability to break existing code, and as the test spec demonstrates, it works.

It allocates the API request POST /projects/fork/:id, the only other API path I'd have thought of would have been POST /projects/:id/fork but that path is already taken by the API for creating a new fork relationship between projects, so POST /projects/fork/:id is the remaining possibility that I could see.

See merge request !191
2014-10-01 10:20:57 +00:00
Dmitriy Zaporozhets 522d754dfe Try wear_merged! without argument
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-10-01 11:43:16 +03:00
Bernhard Kaindl f030ee846e API: Initial support for forking a project via the API
This change adds POST /projects/fork/:id to the API for forking
a project into the namespace of the authenticated user, like the
"create fork" link in the GUI does. It also calls the same code.

Failure and permission checks (except for conflict) are already
implemented and handled in ForkService and the API, so the added
code is simple and does not alter anything.
2014-10-01 10:27:48 +02:00
Dmitriy Zaporozhets 73b92f85bc Merge branch 'add_active_directory_ldap_option' into 'master'
Add active directory ldap option

Fixes #1557

See merge request !1139
2014-10-01 07:04:08 +00:00
Jan-Willem van der Meer 69c17a767c Protect non public methods 2014-09-30 18:10:09 +02:00
Jan-Willem van der Meer 16013bebfe Refactor: Make all Oauth::User methods instance methods 2014-09-30 18:08:05 +02:00
Jan-Willem van der Meer 9edf6f2f9b Add tests for auth hash 2014-09-30 16:29:32 +02:00
Dmitriy Zaporozhets 6fa81e5d58 Add rspec to test_ci
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-30 15:55:03 +03:00
Dmitriy Zaporozhets 99a7bf8823 Separate rake test for simplecov
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-30 15:54:21 +03: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