Commit Graph
386 Commits
Author SHA1 Message Date
Dmitriy Zaporozhets 4e77b0b52d Merge branch '6-3-stable' of dev.gitlab.org:gitlab/gitlabhq into release/6-3
Conflicts:
	Gemfile.lock
	VERSION
	app/assets/javascripts/api.js.coffee
	app/models/user.rb
	app/views/help/index.html.haml
	doc/install/installation.md
	doc/update/5.4-to-6.0.md
	doc/update/6.0-to-6.1.md
	doc/update/6.1-to-6.2.md
	lib/api/api.rb
	lib/api/entities.rb
	lib/gitlab/ldap/user.rb
	lib/tasks/gitlab/check.rake

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-29 10:01:43 +02:00
Dmitriy Zaporozhets 51ae88c4e4 Improve refs parsing for git over http
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-22 12:55:20 +02:00
Dmitriy Zaporozhets 06feb3c442 Cleanup parsed refs for git over HTTP
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-22 12:41:55 +02:00
Dmitriy Zaporozhets b07c02eb13 Add more info to admin dashboard
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-20 13:41:41 +02:00
Dmitriy Zaporozhets 182aa19e26 Parse all refs when do push via HTTP and check permissions for all of them
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-20 11:06:19 +02:00
Dmitriy Zaporozhets 3f3b202c6e Improve files API. Relative path check added. Create dir for new file if missing
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-20 10:21:45 +02:00
Dmitriy Zaporozhets 3bab1bd4c1 Improve consistency: use file_path for API create/update/delete files
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-20 10:03:50 +02:00
Dmitriy Zaporozhets 8a91e5d7d0 Fix DeleteFile satellite action
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-19 16:13:37 +02:00
Dmitriy Zaporozhets b26abe8ff8 Delete file action for satellites
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-19 15:41:32 +02:00
Dmitriy Zaporozhets 60959df3f2 Remove gitolite mention
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-19 15:41:11 +02:00
Dmitriy Zaporozhets 64edb27aa9 Extend Gitlab#default_regex. Dont allow project path ends with .git
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-13 16:13:40 +02:00
Dmitriy Zaporozhets 986697a99b Refactor Create/Update file context and lib
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-11 14:58:39 +02:00
Dmitriy Zaporozhets 0b67606af6 New API: create file in repo
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-07 18:53:09 +02:00
Jacob Vosmaer 9b7174c333 Try sAMAccountName is omniauth nickname is nil 2013-11-06 09:42:25 +01:00
Dmitriy Zaporozhets bd2b6f5944 New feature: Create file from UI
Now you are able to create a new file in repository from your browser.
You are not allowed to create a file if file with same name already
exists in the repo.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-05 10:28:49 +02:00
Elias Mårtenson bc8a875df1 When looking up a user by DN, use single scope
The blocked? method is used to check whether a user exists in LDAP. Prior to this change, if the LDAP server had more objects below the one pointed to by the DN, those objects would also be picked up by the search, causing the method to determine the user should be blocked.

One case where this can happen is when using Active Directory and a user have a mobile phone assigned. In this case, Exchange will add an entry called ExchangeActiveSyncDevices under the users entry. The user-visible behaviour is then that a user loses Gitlab access when he enables a mobile device.

This fix sets the search scope to BaseObject in order to ensure that only the user itself is returned.
2013-11-03 21:51:10 +08:00
Dmitriy Zaporozhets 592d1fabd6 Revert "Escape strings"
This reverts commit ce75f46bf7.
2013-11-01 16:29:28 +02:00
Dmitriy Zaporozhets 482a39abb0 Revert "Best to escape strings not split them"
This reverts commit aca7f56fef.
2013-11-01 16:25:06 +02:00
Dmitriy Zaporozhets ccf9bfbfb9 Respect LDAP user filter for SSH and Git over HTTP
Remove LDAP::User#blocked? method because it duplciate
existing functionality of LDAP::Access#allowed? method

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2013-11-01 15:01:14 +02:00
Dmitriy Zaporozhets c9a2765515 Merge branch '6-2-stable' of dev.gitlab.org:gitlab/gitlabhq into upstream/6-2-stable
Conflicts:
	VERSION
	app/models/group.rb
	app/views/groups/edit.html.haml
	db/schema.rb
	doc/api/groups.md
	doc/api/projects.md
	doc/install/installation.md
	lib/api/projects.rb
	spec/requests/api/groups_spec.rb
	spec/requests/api/projects_spec.rb
2013-10-31 14:29:48 +02:00
Nigel Kukard aca7f56fef Best to escape strings not split them
Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
2013-10-31 07:34:11 +00:00
Nigel Kukard ce75f46bf7 Escape strings
Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
2013-10-29 18:06:10 +00:00
Oleg Girko b215350edf Set username field of users created from LDAP to uid attribute.
The previous approach of making username from user part of
email address (part of address before '@') has the following limitations:
* username in email is not guaranteed to be unique,
* email could have nothing to do with user identity in LDAP
  (like presonal email on an external email service).
On the other hand, LDAP uid is guaranteed to be unique,
as it represents user's login name on Unix/Linux systems.

To understand this change, please note that gitlab_omniauth-ldap
Ruby gem uses the following mapping to store LDAP attrinbutes in auth info:
* dn attribute of LDAP entry is stored in uid attribute of auth info;
* uid attribute of LDAP entry is stored in nickname attribute of auth info.

Signed-off-by: Oleg Girko <oleg.girko@jolla.com>
2013-10-29 03:11:17 +00:00
Dmitriy Zaporozhets 0542261437 Allow git clone with http for GitLab CI service:
If you enable GitLab CI for project you will be able to clone project
source code with next command:
git clone http://gitlab-ci-token:XXXXXXXXXXXX@host:project.git
Requires for GitLab CI 4.0
2013-10-24 17:17:22 +03:00
Peter Fern 05c988419f Expand refs constraints to include valid characters
Fixes #4831, #4865, #4932
2013-10-24 16:31:15 +11:00
Jacob Vosmaer 0b85f54201 Allow LDAP groups to be empty 2013-10-22 17:29:37 +02:00
Dmitriy Zaporozhets 2e8b0fa5cf Oauth users and users created by admin should be confirmed immediatly 2013-10-15 09:59:58 +03:00
Dmitriy Zaporozhets baa65e89b9 Check if LDAP user was removed or blocked when use git over ssh 2013-10-07 16:06:30 +03:00
Marin Jankovski a817993439 Remove outdated comments. 2013-10-04 13:26:48 +02:00
Marin Jankovski fa7d75733c Fix failed merge when filename is the same as target branchname. 2013-10-04 12:38:49 +02:00
Dmitriy Zaporozhets 172eb64deb LDAP user filter option in gitlab.yml
Now you are able to specify LDAP user filter string in gitlab.yml.
So its possible to exclude some users from accessing gitlab.
If user with LDAP account not matching this filter will try to login or
use gitlab he will get error message like 'Access denied for your LDAP
account' and will be signed out.
2013-10-01 14:45:21 +03:00
Dmitriy Zaporozhets 0f69c2f82f LDAP::Adapter#groups allow size argument 2013-10-01 11:37:20 +03:00
Dmitriy Zaporozhets 0c5a9f20b5 Merge branch '6-1-stable' of https://dev.gitlab.org/gitlab/gitlabhq into 6-1-stable-ee
Conflicts:
	VERSION
	app/controllers/application_controller.rb
	app/controllers/omniauth_callbacks_controller.rb
	app/models/merge_request.rb
	app/models/user.rb
	app/views/groups/_projects.html.haml
	config/routes.rb
	db/schema.rb
	doc/install/installation.md
2013-09-27 15:24:54 +03:00
Izaak Alpert 8a8123a3d4 Update for readability
fixed a test a broke in the configurable theme PR
Change-Id: Id894506941bc01ab0d259d48ca7ff9b80bb2c57e
2013-09-22 20:56:17 -04:00
Izaak Alpert 4fcc17e667 Allows username only updates to ldap properties
-when logging in if users are allowed to login with just usernames in ldap we will update uid of the user if their uid is out of date

Conflicts:
	spec/lib/auth_spec.rb

Change-Id: Ia171b3d5133da86edc18c0d08ecfaf6a174f2574
2013-09-22 20:25:47 -04:00
Dmitriy Zaporozhets 062258df91 LDAP: Use first value instead of joined one for uid, cn 2013-09-16 12:22:26 +03:00
Dmitriy Zaporozhets 4f9098032c Remove code that was accidently added in 5dae40f579 2013-09-14 10:14:55 +03:00
Izaak Alpert 88d4559e62 Removed private scope
Change-Id: Ia723321a5cb05deb626d34c7d8d78194e049b1f0
2013-09-11 14:32:24 -04:00
Izaak Alpert 5dae40f579 Update to only provide one way to get a default user
-calling build_user will now apply defaults and only override them if as: :admin is set

Change-Id: Id1d938c0967752ecc14370af54f2d88128d18c44
2013-09-11 14:04:15 -04:00
Dmitriy Zaporozhets 61ba66c033 Refactor LDAP::Access
Select only LDAP groups that are activated inside GitLab
Make LDAP::Access more readable
2013-09-10 11:54:37 +03:00
Dmitriy Zaporozhets 445070698a Use dn lookup for person. Collect group members dn when check for membership 2013-09-09 12:25:53 +03:00
Dmitriy Zaporozhets d30a55a99a Use LDAP user uid from config. Search by first value from user dn 2013-09-07 11:30:50 +03:00
Dmitriy Zaporozhets 397282b4bc Respect LDAP uid value from config 2013-09-04 18:44:20 +03:00
Dmitriy Zaporozhets 9109a20758 Improve commit diff
* show highlights when replace empty line with content
* show inline diff when replace line with spaces with content
2013-09-04 18:15:42 +03:00
Dmitriy Zaporozhets a8cb13c85d Merge branch 'master' of github.com:gitlabhq/gitlabhq 2013-09-04 16:50:42 +03:00
Dmitriy Zaporozhets 3707cc119b Refactor Gitlab::Auth 2013-09-04 00:12:00 +03:00
Dmitriy Zaporozhets 0df1cf7fcc Inherit Gitlab::LDAP::User from Gitlab::OAuth::User 2013-09-04 00:06:13 +03:00
Dmitriy Zaporozhets b45e92646e Added Gitlab::OAuth::User class
Authenticate or create users from OAuth providers
2013-09-04 00:04:27 +03:00
Robert Schilling e832c4d90d Add 'notes' to path blacklist, fixes #4967 2013-09-03 07:25:39 +02:00
Dmitriy Zaporozhets 7dfb2b6379 Remove include of grack_ldap 2013-09-02 23:52:58 +03:00