Robert Speicher
d49768296c
Auto-correct `RSpec/DescribedClass` violations
2017-05-01 11:13:33 -04:00
Rémy Coutable
fa01c37359
Ensures that OAuth/LDAP/SAML users don't need to be confirmed
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-26 10:08:44 +02:00
Douwe Maan
d7e2ac7293
Fix OAuth, LDAP and SAML SSO when regular sign-ups are disabled
2017-04-24 19:27:39 -07:00
Robert Speicher
def164e761
Fix RSpec/DescribeSymbol cop violations
2017-03-24 19:04:03 -04:00
Robert Speicher
509ff2ab17
Merge branch 'enable-rspec-be_eql-cop' into 'master'
...
Enable the RSpec/BeEql cop
See merge request !9476
2017-02-23 18:55:33 +00:00
Douwe Maan
56de781a2c
Revert "Enable Style/DotPosition"
...
This reverts commit e00fb2bdc2090e9cabeb1eb35a2672a882cc96e9.
# Conflicts:
# .rubocop.yml
# .rubocop_todo.yml
# lib/gitlab/ci/config/entry/global.rb
# lib/gitlab/ci/config/entry/jobs.rb
# spec/lib/gitlab/ci/config/entry/factory_spec.rb
# spec/lib/gitlab/ci/config/entry/global_spec.rb
# spec/lib/gitlab/ci/config/entry/job_spec.rb
# spec/lib/gitlab/ci/status/build/factory_spec.rb
# spec/lib/gitlab/incoming_email_spec.rb
2017-02-23 09:33:19 -06:00
Douwe Maan
1fe7501b49
Revert "Prefer leading style for Style/DotPosition"
...
This reverts commit cb10b725c8929b8b4460f89c9d96c773af39ba6b.
2017-02-23 09:33:05 -06:00
Douwe Maan
7d4b52b27d
Enable Style/WordArray
2017-02-23 09:32:41 -06:00
Douwe Maan
206953a430
Prefer leading style for Style/DotPosition
2017-02-23 09:32:22 -06:00
Douwe Maan
3dadf306dd
Enable Style/DotPosition
2017-02-23 09:31:56 -06:00
Rémy Coutable
8b2ea599e3
Enable the RSpec/BeEql cop
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-02-23 16:04:34 +01:00
Valery Sizov
ceb1ebd959
Active tense test coverage
...
Ports changes from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/642 back into CE
2017-02-01 22:45:41 +00:00
Grzegorz Bizon
cff423449f
Fix Rubocop offenses in LDAP related code and spec
2017-01-10 14:31:21 +01:00
Rémy Coutable
6056903265
Merge branch 'feature/log-ldap-to-application-log' into 'master'
...
Log LDAP blocking/unblocking events to application log
See merge request !8042
2017-01-09 13:39:19 +00:00
Drew Blessing
de4eee0894
LDAP attributes needs default values
2017-01-06 00:24:33 -06:00
Drew Blessing
babb7d5260
Gitlab::LDAP::Person uses LDAP attributes configuration
...
We allow users to configure LDAP attribute preferences. For example,
email can be configured to use `mail`, `email` and `userPrincipalName`,
falling through to the next until a value is found. Prior to this
change, Gitlab::LDAP::Person did not honor this configuration. Now,
the class will honor `name` and `mail` configuration. It does not
handle `username`, or fallback to `first_name` + `last_name` in the
absence of `name`.
2017-01-03 13:26:47 -06:00
Markus Koller
bd0c171c55
fixup! Log messages when blocking/unblocking LDAP accounts
2016-12-20 19:54:37 +01:00
Markus Koller
e87e280598
Log messages when blocking/unblocking LDAP accounts
2016-12-20 19:51:45 +01:00
Drew Blessing
c50b98da72
Centralize LDAP config/filter logic
...
Centralize all LDAP config logic in `GitLab::LDAP::Config`. Previously,
some logic was in the Devise initializer and it was not honoring the
`user_filter`. If a user outside the configured `user_filter` signed
in, an account would be created but they would then be denied access.
Now that logic is centralized, the filter is honored and users outside
the filter are never created.
2016-11-11 15:58:33 -06:00
Drew Blessing
dc30783057
Introduce better credential and error checking to `rake gitlab:ldap:check`
...
It was previously possible for invalid credential errors to go unnoticed
in this task. Users would believe everything was configured correctly and
then sign in would fail with 'invalid credentials'. This adds a specific
bind check, plus catches errors connecting to the server. Also, specs :)
2016-11-08 15:46:10 -06:00
Markus Koller
68364fe2f0
Log LDAP lookup errors and don't swallow unrelated exceptions
...
Signed-off-by: Roger Meier <r.meier@siemens.com>
2016-09-28 07:44:58 +02:00
Drew Blessing
bf8a48e179
Request only the LDAP attributes we need
2016-09-09 13:14:57 -05:00
tiagonbotelho
1d268a89de
adds second batch of tests changed to active tense
2016-08-09 15:11:39 +01:00
Robert Speicher
adc6ec4a9c
Avoid `describe`-ing symbols in specs
2016-07-12 10:27:58 -05:00
Grzegorz Bizon
9e211091a8
Enable Style/EmptyLines cop, remove redundant ones
2016-07-01 21:56:17 +02:00
Gabriel Mazetto
5ee6badade
Unblocks user when active_directory is disabled and it can be found
2016-04-05 16:34:31 -03:00
Douwe Maan
98e1a5b634
Allow LDAP users to change their email if it was not set by the LDAP server
2016-01-19 16:25:38 +01:00
Gabriel Mazetto
dd6fc01ff8
fixed LDAP activation on login to use new ldap_blocked state
2016-01-14 03:31:27 -02:00
Gabriel Mazetto
d6dc088aff
LDAP synchronization block/unblock new states
2016-01-08 16:26:04 -02:00
Patricio Cano
1d3889eb46
Fix identity and user retrieval when special characters are used
2015-12-22 13:23:35 -05:00
Douwe Maan
13d6bab177
Tag lib specs
2015-12-09 11:55:42 +01:00
Drew Blessing
bf5683f889
Block LDAP user when they are no longer found in the LDAP server
2015-12-08 11:15:30 -06:00
Drew Blessing
b7def88c02
Fix ldap email downcasing bug
2015-10-08 14:59:46 -05:00
Douwe Maan
73a3df4de3
Fix LDAP attribute mapping
2015-09-23 16:37:59 +02:00
Douwe Maan
c52fee70d0
Test overriding LDAP attributes
2015-09-09 11:51:40 +01:00
Douwe Maan
0e9ba0a4fa
Add attributes to LDAP::Config.
2015-09-08 17:34:18 +01:00
Joel Koglin
4d2f36118a
Issue #993 : Fixed login failure when extern_uid changes
2015-08-21 09:36:27 -07:00
Robert Speicher
bf71d53f63
Change `to_not` calls to `not_to`
...
Both work, but now we're consistent across the entire app.
2015-06-22 12:13:49 +02:00
Robert Speicher
0f627f1c60
Fix `raise_error` without an argument deprecation warnings
2015-06-22 12:13:47 +02:00
Robert Speicher
5a9ede4721
Update mock and stub syntax for specs
2015-06-22 12:13:46 +02:00
Robert Speicher
422236c71e
Change `foo.should` syntax to `expect(foo).to` in specs
2015-06-13 18:37:30 -04:00
Robert Speicher
75a40ad5bc
Change `foo.should_not` syntax to `expect(foo).not_to` in specs
2015-06-13 18:19:24 -04:00
Douwe Maan
125cb9b866
Don't accidentally unblock auto created users from Active Directory.
2015-05-12 11:26:43 +02:00
Douwe Maan
238e4f0295
Add config var to block auto-created LDAP users.
2015-04-14 17:09:05 +02:00
Jacob Vosmaer
65a3928b0b
Remove test for 'ldap' provider special case
2015-04-13 12:58:10 +02: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
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
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
Valery Sizov
f9a730ebb4
fix specs
2014-12-04 15:53:26 +02:00