Commit Graph
27 Commits
Author SHA1 Message Date
Jacob Vosmaer 9b7174c333 Try sAMAccountName is omniauth nickname is nil 2013-11-06 09:42:25 +01: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
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
Jacob Vosmaer 0b85f54201 Allow LDAP groups to be empty 2013-10-22 17:29:37 +02: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
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 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 0df1cf7fcc Inherit Gitlab::LDAP::User from Gitlab::OAuth::User 2013-09-04 00:06:13 +03:00
Dmitriy Zaporozhets 71abf70458 Move ldap auth to LDAP::User. Removed unused code 2013-09-02 23:50:45 +03:00
Dmitriy Zaporozhets 6bf117c601 Mode User+LDAP functionality from Gitlab::Auth 2013-09-02 23:35:40 +03:00
Dmitriy Zaporozhets 3ced0cd704 Ignore ldap groups check if ldap.group_base setting is empty 2013-08-27 11:33:44 +03:00
Dmitriy Zaporozhets a48fffc4db Fix ldap adapter for ssl connection 2013-08-16 14:55:52 +03:00
Dmitriy Zaporozhets 541e70d8f8 Replace license to MIT in EE files 2013-08-12 13:35:52 +03:00
Dmitriy Zaporozhets 915315a460 ldap_access field added to group. set ldap group membership based on ldap_access value 2013-08-09 12:53:52 +03:00
Dmitriy Zaporozhets 7fe779b86f Add/remove user to appropriate groups based on LDAP settings 2013-08-05 15:15:58 +03:00
Dmitriy Zaporozhets 2c8ee98192 We can collect user groups now 2013-07-31 15:04:04 +03:00
Dmitriy Zaporozhets 7ba37d86be Gitlab::LDAP - ability to collect group members 2013-07-31 14:58:04 +03:00
Dmitriy Zaporozhets 1e9b27332c Add LDAP::Group and LDAP::Person classes. Create LDAP module. Added method for selecting ldap users 2013-07-30 15:54:05 +03:00