Rémy Coutable
cc66c3fda2
Don't force the encoding of the OAuth provider in Gitlab::OAuth::AuthHash#provider
...
Some providers freeze their name (e.g.
414c43ef3f/lib/omniauth/strategies/google_oauth2.rb (L1) ),
so trying to modify the string would fail with a `can't modify frozen
String` exception (see
https://gitlab.com/gitlab-org/gitlab-ce/issues/37845#note_40308148 ).
In this case, we can just stop trying to force the encoding of the
provider name as they should always be in utf8 by default.
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-09-14 10:29:35 +02:00
Alexander Keramidas
4df54f2607
Profile updates from providers
2017-09-06 16:38:52 +03:00
Robert Speicher
4edfad9678
Enable Layout/TrailingWhitespace cop and auto-correct offenses
2017-08-15 13:44:37 -04:00
Rémy Coutable
c946ee1282
Enable the Layout/SpaceBeforeBlockBraces cop
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-08-09 11:52:22 +02:00
Robin Bobbitt
71951fc38c
Uniquify reserved word usernames on OAuth user creation
2017-08-02 09:40:49 -04:00
Rémy Coutable
cddc5cacfb
Use described_class when possible
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Rémy Coutable
ddccd24c13
Remove superfluous lib: true, type: redis, service: true, models: true, services: true, no_db: true, api: true
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-07-27 14:31:53 +02:00
Robert Speicher
a6ec5121f0
Correct RSpec/SingleLineHook cop offenses
2017-06-14 13:18:56 -05:00
Robin Bobbitt
469acd190e
Sync email address from specified omniauth provider
2017-06-07 11:13:57 -04:00
Douwe Maan
04bb8fe994
Return nil when looking up config for unknown LDAP provider
2017-05-30 16:41:07 -05: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
DJ Mountney
a766f60a0b
Inlude the password_automatically_check param as permitted config in the user create_service
...
This param is passed to service in two places, one is in the build_user for non ldap oauth users. And the other is in the initial production admin user seed data.
Without this change, when setting up GitLab in a production environment, you were not being given the option of setting the root password on initial setup in the UI.
2017-04-04 10:18:56 -07: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
99a34a52d7
Enable Style/MultilineArrayBraceLayout
2017-02-23 09:32:22 -06:00
Douwe Maan
206953a430
Prefer leading style for Style/DotPosition
2017-02-23 09:32:22 -06:00
Douwe Maan
5c7f9d69e3
Fix code for cops
2017-02-23 09:31:57 -06:00
Douwe Maan
c10064aad5
Enable Style/SpaceInsideBrackets
2017-02-23 09:31:56 -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
Drew Blessing
3cff3a2e5b
Omniauth auto link LDAP user falls back to find by DN when user cannot be found by uid
2016-11-10 15:47:40 -06:00
tiagonbotelho
1d268a89de
adds second batch of tests changed to active tense
2016-08-09 15:11:39 +01:00
Tomasz Maczukin
f1a85747ca
Merge branch 'master' into dev-master
...
* master: (98 commits)
Enable Style/EmptyLines cop, remove redundant ones
Update CHANGELOG
Cache results from jQuery selectors to retrieve namespace name
Fix import button when import fail due the namespace already been taken
Fix snippets comments not displayed
Fix emoji paths in relative root configurations
Exclude requesters from Project#members, Group#members and User#members
Upgrade Thin from 1.6.1 to 1.7.0.
Many squashed commits
Cache autocomplete results
Upgrade Sidekiq from 4.1.2 to 4.1.4.
Upgrade seed-fu from 2.3.5 to 2.3.6
use has_many relationship with events
Support creating a todo on issuables via API
Expose target, filter by state as string
Add todos API documentation and changelog
Improve the request / withdraw access button
Metrics for Rouge::Plugins::Redcarpet and Rouge::Formatters::HTMLGitlab
Groundwork for Kerberos SPNEGO (EE feature)
Update CHANGELOG 8.9.5 for runners related fixes
...
2016-07-02 22:58:21 +02:00
Grzegorz Bizon
9e211091a8
Enable Style/EmptyLines cop, remove redundant ones
2016-07-01 21:56:17 +02:00
Patricio Cano
10444f61f8
Fixed privilege escalation issue where manually set external users would be reverted back to internal users if they logged in via OAuth and that provider was not in the `external_providers` list.
2016-06-29 10:37:54 -05:00
Grzegorz Bizon
28bafd5354
Enable Style/SpaceAfterComma Rubocop cop
2016-06-29 15:23:44 +02:00
Patricio Cano
ea04b0191d
Added default setting for `external_providers`
2016-04-11 10:16:42 -05:00
Patricio Cano
bb4fa3a185
Make new `allow_single_sign_on` feature backwards compatible
2016-02-18 17:02:43 -05:00
Patricio Cano
06376be56a
Decouple SAML authentication from the default Omniauth logic
2016-02-18 17:01:07 -05:00
Douwe Maan
873b0db220
Revert "Merge branch 'saml-decoupling' into 'master'
"
...
This reverts commit c04e22fba8 , reversing
changes made to 0feab326d5 .
2016-02-18 22:14:53 +01:00
Patricio Cano
f014127e17
Decouple SAML authentication from the default Omniauth logic
2016-02-18 13:22:19 -05:00
Corey Hinshaw
d8b3c3274c
AuthHash should not parameterize email user
2015-12-10 18:49:48 -05:00
Douwe Maan
13d6bab177
Tag lib specs
2015-12-09 11:55:42 +01:00
Guilherme Garnier
aed145a9c6
Fix rubocop warnings in spec/lib and spec/tasks
2015-10-03 16:02:21 -05:00
Douwe Maan
c915e2c823
Allow configuration of LDAP attributes GitLab will use for the new user account.
2015-09-08 16:18:14 +01:00
Douwe Maan
c16b1651f5
Fix infinite loop when SAML was incorrectly configured.
2015-08-17 16:39:22 -07:00
Dmitriy Zaporozhets
f40b99d02e
Merge branch 'master' into rubocop-for-tests
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Conflicts:
spec/features/issues_spec.rb
spec/models/forked_project_link_spec.rb
spec/models/hooks/service_hook_spec.rb
spec/models/hooks/web_hook_spec.rb
spec/models/project_services/hipchat_service_spec.rb
spec/requests/api/project_members_spec.rb
spec/requests/api/projects_spec.rb
spec/requests/api/system_hooks_spec.rb
spec/services/archive_repository_service_spec.rb
spec/support/matchers.rb
spec/tasks/gitlab/backup_rake_spec.rb
2015-06-23 10:44:03 +02:00
Robert Speicher
15a05be70d
Fix Style/Blocks cop violations
2015-06-22 16:00:54 -04:00
Robert Speicher
e4e01dbf41
Fix Gitlab::OAuth::User spec
2015-06-22 12:13:49 +02: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
Alex Lossent
d96d9aae42
Fix behavior of ldap_person method in Gitlab::OAuth::User
...
Code tweaks in 45e9150a caused the ldap_person method to not return expected results.
Improved tests to cover the ldap_person method, which was previously stubbed.
2015-06-17 18:06:27 +02:00
Robert Speicher
422236c71e
Change `foo.should` syntax to `expect(foo).to` in specs
2015-06-13 18:37:30 -04:00
Alex Lossent
dfcea8ed51
Add option to automatically link omniauth and LDAP identities
...
Until now, a user needed to first sign in with his LDAP identity and then manually
link his/her account with an omniauth identity from their profile.
Only when this is done can the user authenticate with the omniauth provider and at
the same time benefit from the LDAP integration (HTTPS authentication with LDAP
username/password and in EE: LDAP groups, SSH keys etc.).
This feature automates the process by looking up a corresponding LDAP person when a
user connects with omniauth for the first time and then automatically linking the LDAP
and omniauth identities (of course, like the existing allow_single_sign_on setting,
this is meant to be used with trusted omniauth providers).
The result is identical to a manual account link.
Add config initializers for other omniauth settings.
2015-06-03 11:46:20 +02: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
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